Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
45 | 2 | private function getCommandsFromFinder(): array |
|
46 | { |
||
47 | 2 | $commands = []; |
|
48 | 2 | foreach ($this->commandFinder->getCommandClasses() as $file) { |
|
49 | 2 | require_once $file->getRealPath(); |
|
50 | |||
51 | 2 | $className = sprintf( |
|
52 | 2 | 'Nexus\\CustomCommand\\Command\\%s', |
|
53 | 2 | $file->getBasename('.php') |
|
54 | ); |
||
55 | 2 | $commands[] = new $className(); |
|
56 | } |
||
57 | 2 | return $commands; |
|
58 | } |
||
59 | |||
61 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.