1 | <?php |
||
28 | class ConfigExampleCommand extends Command |
||
29 | { |
||
30 | /** |
||
31 | * Set the command shortcut to be used in configuration |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $command = 'config:example'; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Configure the command |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | 13 | protected function configure() |
|
54 | |||
55 | /** |
||
56 | * Execute the command |
||
57 | * |
||
58 | * @param InputInterface $input |
||
59 | * @param OutputInterface $output |
||
60 | * |
||
61 | * @return void |
||
62 | */ |
||
63 | protected function execute(InputInterface $input, OutputInterface $output) |
||
72 | } |
||
73 |
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.