1 | <?php |
||
10 | class NotProcessableException extends \RuntimeException |
||
11 | { |
||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | protected $progressionMultiplier = 1; |
||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | private $secondsBeforeRetry; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $maxTries; |
||
25 | |||
26 | public function maxTries(int $maxTries): NotProcessableException |
||
32 | |||
33 | /** |
||
34 | * @param $delaySeconds |
||
35 | * @param float $progressionMultiplier |
||
36 | * @return self |
||
37 | */ |
||
38 | public function retryProgressively($delaySeconds, $progressionMultiplier): NotProcessableException |
||
45 | |||
46 | /** |
||
47 | * @return int |
||
48 | */ |
||
49 | public function getSecondsBeforeRetry(): ?int |
||
53 | |||
54 | /** |
||
55 | * @return int |
||
56 | */ |
||
57 | public function getMaxTries(): ?int |
||
61 | |||
62 | /** |
||
63 | * @return int |
||
64 | */ |
||
65 | public function getProgressionMultiplier(): int |
||
69 | } |
||
70 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.