| 1 | <?php declare(strict_types=1); |
||
| 12 | final class Mapper implements MapperInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | private $map = []; |
||
| 18 | |||
| 19 | /** @var Reader */ |
||
| 20 | private $reader; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param Reader|null $reader |
||
| 24 | */ |
||
| 25 | 6 | public function __construct(?Reader $reader = null) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $path |
||
| 32 | * @return Mapper |
||
| 33 | */ |
||
| 34 | 2 | public function map(string $path): Mapper |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $command |
||
| 53 | * @param Reader $reader |
||
|
|
|||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | 5 | public function getJobsFromCommand(string $command): array |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @param string $job |
||
| 69 | * @return bool |
||
| 70 | */ |
||
| 71 | 2 | public function hasCommand(string $job): bool |
|
| 75 | |||
| 76 | /** |
||
| 77 | * @param string $job |
||
| 78 | * @throws Exception |
||
| 79 | * @return string |
||
| 80 | */ |
||
| 81 | 3 | public function getCommand(string $job): string |
|
| 89 | } |
||
| 90 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.