1 | <?php |
||
32 | class ColumnNameLoader implements LoaderInterface |
||
33 | { |
||
34 | |||
35 | /** |
||
36 | * The column metadata loader instance. |
||
37 | * |
||
38 | * @var \TechDivision\Import\Loaders\LoaderInterface |
||
39 | */ |
||
40 | protected $columnMetadataLoader; |
||
41 | |||
42 | /** |
||
43 | * Construct a new instance. |
||
44 | * |
||
45 | * @param \TechDivision\Import\Loaders\LoaderInterface $columnMetadataLoader The column metadata loader instance |
||
46 | */ |
||
47 | public function __construct(LoaderInterface $columnMetadataLoader) |
||
51 | |||
52 | /** |
||
53 | * Loads and returns data. |
||
54 | * |
||
55 | * @param string $tableName The table name to return the list for |
||
56 | * |
||
57 | * @return \ArrayAccess The array with the data |
||
58 | */ |
||
59 | public function load($tableName = null) |
||
63 | } |
||
64 |
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.