| 1 | <?php |
||
| 7 | abstract class Job |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var int |
||
| 11 | */ |
||
| 12 | protected $maxAttempts = 1; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var int |
||
| 16 | */ |
||
| 17 | protected $reattemptDelay = 0; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var DateTimeImmutable |
||
| 21 | */ |
||
| 22 | protected $createdAt; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var bool |
||
| 26 | */ |
||
| 27 | protected $isExpendable = false; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var null|string |
||
| 31 | */ |
||
| 32 | protected $fifoGroupId; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return void |
||
|
|
|||
| 36 | */ |
||
| 37 | 4 | public function __construct() |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @return int |
||
| 46 | */ |
||
| 47 | 2 | public function maxAttempts(): int |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @param int $maxAttempts |
||
| 54 | */ |
||
| 55 | 1 | public function setMaxAttempts(int $maxAttempts): void |
|
| 59 | |||
| 60 | /** |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | 2 | public function reattemptDelay(): int |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @param int $reattemptDelay |
||
| 70 | */ |
||
| 71 | 1 | public function setReattemptDelay(int $reattemptDelay): void |
|
| 75 | |||
| 76 | /** |
||
| 77 | * @return DateTimeImmutable |
||
| 78 | */ |
||
| 79 | 5 | public function createdAt(): DateTimeImmutable |
|
| 83 | |||
| 84 | /** |
||
| 85 | * @return bool |
||
| 86 | */ |
||
| 87 | 4 | public function isExpendable(): bool |
|
| 91 | |||
| 92 | /** |
||
| 93 | * @return null|string |
||
| 94 | */ |
||
| 95 | 2 | public function fifoGroupId(): ?string |
|
| 99 | |||
| 100 | /** |
||
| 101 | * @return void |
||
| 102 | */ |
||
| 103 | 4 | protected function setFifoGroupId(): void |
|
| 107 | |||
| 108 | /** |
||
| 109 | * @return Job[] |
||
| 110 | */ |
||
| 111 | public function dependentJobs(): array |
||
| 115 | } |
||
| 116 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.