| 1 | <?php |
||
| 10 | class Logger implements SingletonInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param string $context |
||
| 14 | * @param Exception $e |
||
| 15 | */ |
||
| 16 | public function logException($context, \Exception $e) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $message |
||
| 30 | * @param integer $severity |
||
| 31 | */ |
||
| 32 | private function syslog($message, $severity) |
||
| 36 | } |
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
@ignorePhpDoc annotation to the duplicate definition and it will be ignored.