| 1 | <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase |
||
| 19 | trait PluginTrait { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * InputInterface. |
||
| 23 | * |
||
| 24 | * @var InputInterface|null |
||
| 25 | */ |
||
| 26 | protected $input; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * OutputInterface. |
||
| 30 | * |
||
| 31 | * @var OutputInterface|null |
||
| 32 | */ |
||
| 33 | protected $output; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Instantiate the plugin. |
||
| 37 | * |
||
| 38 | * @param array $config Configuration information from composer.json. |
||
| 39 | */ |
||
| 40 | public static function instantiate( array $config ) { |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Define any command line options the versioning plugin wants to accept. |
||
| 46 | * |
||
| 47 | * @return InputOption[] |
||
| 48 | */ |
||
| 49 | public function getOptions() { |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Set Symfony Console input and output interfaces. |
||
| 55 | * |
||
| 56 | * @param InputInterface $input InputInterface. |
||
| 57 | * @param OutputInterface $output OutputInterface. |
||
| 58 | */ |
||
| 59 | public function setIO( InputInterface $input, OutputInterface $output ) { |
||
| 63 | |||
| 64 | } |
||
| 65 |
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
@ignorePhpDoc annotation to the duplicate definition and it will be ignored.