| 1 | <?php |
||
| 9 | class Factory |
||
| 10 | { |
||
| 11 | protected $loggerBuilder; |
||
| 12 | |||
| 13 | 2 | public static function create($loggerConf = ['builder' => 'NullLogger', 'config' => []]) |
|
| 20 | |||
| 21 | /** |
||
| 22 | * |
||
| 23 | * @param string $api_key |
||
| 24 | * @return \vfalies\tmdb\Tmdb |
||
| 25 | */ |
||
| 26 | 1 | public function getTmdb(string $api_key) |
|
| 30 | |||
| 31 | 2 | public function getBuilder($builder, array $args = []) |
|
| 39 | |||
| 40 | 2 | public function setLoggerBuilder(LoggerBuilderInterface $loggerBuilder) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param $builderConfig |
||
| 49 | * @return array |
||
| 50 | */ |
||
| 51 | 2 | public function extractConfig(array $builderConfig) |
|
| 55 | |||
| 56 | 2 | public function checkDependency(BuilderInterface $builder) |
|
| 65 | } |
||
| 66 |
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.