| 1 | <?php |
||
| 9 | abstract class Job extends Injectable implements \Sid\Cron\JobInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $expression; |
||
| 15 | |||
| 16 | |||
| 17 | |||
| 18 | public function __construct(string $expression) |
||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | public function getExpression() : string |
||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | public function isDue(DateTime $datetime = null) : bool |
||
| 40 | |||
| 41 | |||
| 42 | |||
| 43 | /** |
||
| 44 | * @return mixed |
||
| 45 | */ |
||
| 46 | abstract public function runInForeground(); |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @throws Exception |
||
| 50 | */ |
||
| 51 | public function runInBackground() : Process |
||
| 74 | } |
||
| 75 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):