1 | <?php |
||
8 | class RecordQuery |
||
9 | { |
||
10 | |||
11 | private $type = 0; |
||
12 | |||
13 | private $query; |
||
14 | |||
15 | /** |
||
16 | * @param array $query |
||
17 | * @param $type |
||
18 | */ |
||
19 | 32 | public function __construct(array $query, $type) |
|
24 | |||
25 | /** |
||
26 | * @return array |
||
27 | */ |
||
28 | 28 | public function getRawQuery() |
|
32 | |||
33 | /** |
||
34 | * @param array $query |
||
35 | * @return RecordQuery |
||
36 | 1 | */ |
|
37 | public function setRawQuery($query) |
||
42 | |||
43 | /** |
||
44 | * @return int |
||
45 | 4 | */ |
|
46 | public function getQueryType() |
||
50 | |||
51 | /** |
||
52 | * @param $repository |
||
53 | * @param int $pAPINumber API number (e.g. 3) |
||
54 | * @return \Doctrine\Common\Collections\ArrayCollection |
||
55 | */ |
||
56 | public function execute($repository, $pAPINumber = 1) |
||
70 | } |
||
71 |
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.