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 | */ |
||
52 | protected function write(array $record) |
||
56 | |||
57 | public function handleBatch(array $records) |
||
66 | } |
||
67 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.