Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
81 | public function testArgs($expectedLinux, $expectedWindows, $args) |
||
82 | { |
||
83 | $expected = stripos(PHP_OS, 'WIN') === 0 ? $expectedWindows : $expectedLinux; |
||
84 | $commandArguments = new CommandArgumentsHost(); |
||
85 | $commandArguments->args($args); |
||
86 | $this->assertEquals($expected, $commandArguments->getArguments()); |
||
87 | |||
88 | if ($args) { |
||
89 | $commandArguments = new CommandArgumentsHost(); |
||
90 | call_user_func_array([$commandArguments, 'args'], $args); |
||
91 | $this->assertEquals($expected, $commandArguments->getArguments()); |
||
92 | } |
||
93 | } |
||
94 | } |
||
95 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.