Skip to content

Commit 479aeec

Browse files
author
palPalani
committed
Improved parameter type and return type
1 parent 5e9fbd0 commit 479aeec

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

src/Jobs/DispatcherJob.php

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,10 @@ class DispatcherJob implements ShouldQueue
1313
use Queueable;
1414
use SerializesModels;
1515

16-
/**
17-
* @var mixed
18-
*/
19-
protected $data;
16+
protected bool $plain = false;
2017

21-
/**
22-
* @var bool
23-
*/
24-
protected $plain = false;
25-
26-
/**
27-
* DispatchedJob constructor.
28-
* @param $data
29-
*/
30-
public function __construct($data)
18+
public function __construct(protected $data)
3119
{
32-
$this->data = $data;
3320
}
3421

3522
/**
@@ -51,7 +38,7 @@ public function getPayload()
5138
* @param bool $plain
5239
* @return $this
5340
*/
54-
public function setPlain($plain = true)
41+
public function setPlain(bool $plain = true): self
5542
{
5643
$this->plain = $plain;
5744

@@ -61,7 +48,7 @@ public function setPlain($plain = true)
6148
/**
6249
* @return bool
6350
*/
64-
public function isPlain()
51+
public function isPlain(): bool
6552
{
6653
return $this->plain;
6754
}

0 commit comments

Comments
 (0)