1 | <?php |
||
9 | class YarakCommand extends Command |
||
10 | { |
||
11 | /** |
||
12 | * Application config. |
||
13 | * |
||
14 | * @var Config |
||
15 | */ |
||
16 | protected $config; |
||
17 | |||
18 | /** |
||
19 | * Construct. |
||
20 | */ |
||
21 | public function __construct() |
||
27 | |||
28 | /** |
||
29 | * Get an instance of the migrator. |
||
30 | * |
||
31 | * @param SymfonyOutput $symfonyOutput |
||
32 | * |
||
33 | * @return Migrator |
||
34 | */ |
||
35 | protected function getMigrator(SymfonyOutput $symfonyOutput) |
||
45 | |||
46 | /** |
||
47 | * Get the name of the migrator class. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | protected function getMigratorClassName() |
||
58 | |||
59 | /** |
||
60 | * Get an instance of MigrationRepository. |
||
61 | * |
||
62 | * @return Yarak\Migrations\MigrationRepository |
||
63 | */ |
||
64 | protected function getRepository() |
||
73 | } |
||
74 |
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.