1 | <?php |
||
12 | class QueuedJobHandler extends AbstractProcessingHandler |
||
13 | { |
||
14 | use Injectable; |
||
15 | |||
16 | /** @var QueuedJob */ |
||
17 | protected $job; |
||
18 | |||
19 | /** @var QueuedJobDescriptor */ |
||
20 | protected $jobDescriptor; |
||
21 | |||
22 | public function __construct(QueuedJob $job, QueuedJobDescriptor $jobDescriptor) |
||
29 | |||
30 | /** |
||
31 | * @return QueuedJob |
||
32 | */ |
||
33 | public function getJob() |
||
37 | |||
38 | /** |
||
39 | * @return QueuedJobDescriptor |
||
40 | */ |
||
41 | public function getJobDescriptor() |
||
45 | |||
46 | /** |
||
47 | * Writes the record down to the log of the implementing handler |
||
48 | * |
||
49 | * @param array $record |
||
50 | * @return void |
||
51 | * @throws \SilverStripe\ORM\ValidationException |
||
52 | */ |
||
53 | protected function write(array $record) |
||
59 | } |
||
60 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: