1 | <?php |
||
17 | class PagesList |
||
18 | { |
||
19 | /** @var AbstractPage[] */ |
||
20 | protected $pages = []; |
||
21 | |||
22 | /** |
||
23 | * PagesList constructor. |
||
24 | * @param AbstractPage[] $pages |
||
25 | */ |
||
26 | public function __construct(array $pages) |
||
30 | |||
31 | /** |
||
32 | * @param string $path |
||
33 | * @param FileSystemStorage $storage |
||
34 | * @return PagesList |
||
35 | * @throws \yii\base\InvalidConfigException |
||
36 | */ |
||
37 | public static function createFromDir(string $path, FileSystemStorage $storage): PagesList |
||
53 | |||
54 | /** |
||
55 | * @return ArrayDataProvider |
||
56 | */ |
||
57 | public function getDataProvider(): ArrayDataProvider |
||
66 | } |
||
67 |
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.