1 | <?php |
||
13 | class File400 extends Returning |
||
14 | { |
||
15 | /** |
||
16 | * File schema file. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $schemaFile = '/schemas/400.json'; |
||
21 | |||
22 | /** |
||
23 | * Fetch and return motives descriptions from received detail data. |
||
24 | * |
||
25 | * @param \StdClass $data |
||
26 | * @return array |
||
27 | */ |
||
28 | public function getMotives(StdClass $data) |
||
39 | |||
40 | /** |
||
41 | * Check if received data as other motive set. |
||
42 | * |
||
43 | * @param \StdClass $data |
||
44 | * @return boolean |
||
45 | */ |
||
46 | protected function hasOtherMotive(StdClass $data) |
||
56 | |||
57 | /** |
||
58 | * Parse the motive parts from received motive. |
||
59 | * |
||
60 | * @param \StdClass $data |
||
61 | * @return array |
||
62 | */ |
||
63 | protected function parseMotiveParts(StdClass $data) |
||
77 | } |
||
78 |
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.