1 | <?php |
||
34 | class ColumnValuesUtil implements ColumnValuesUtilInterface |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The column name loader instance. |
||
39 | * |
||
40 | * @var \TechDivision\Import\Loaders\LoaderInterface |
||
41 | */ |
||
42 | protected $columnNameLoader; |
||
43 | |||
44 | /** |
||
45 | * The table prefix utility instance. |
||
46 | * |
||
47 | * @var \TechDivision\Import\Utils\TablePrefixUtilInterface |
||
48 | */ |
||
49 | protected $tablePrefixUtil; |
||
50 | |||
51 | /** |
||
52 | * Construct a new instance. |
||
53 | * |
||
54 | * @param \TechDivision\Import\Loaders\LoaderInterface $columnNameLoader The column name loader instance |
||
55 | * @param \TechDivision\Import\Utils\TablePrefixUtilInterface $tablePrefixUtil The table prefix utility instance |
||
56 | */ |
||
57 | 1 | public function __construct(LoaderInterface $columnNameLoader, TablePrefixUtilInterface $tablePrefixUtil) |
|
62 | |||
63 | /** |
||
64 | * Returns a concatenated list with key => value pairs of the passed table. |
||
65 | * |
||
66 | * @param string $tableName The table name to return the list for |
||
67 | * |
||
68 | * @return string The concatenated list with the key => value pairs |
||
69 | */ |
||
70 | 1 | public function getColumnValues($tableName) |
|
87 | |||
88 | /** |
||
89 | * Compiles the passed SQL statement. |
||
90 | * |
||
91 | * @param string $statement The SQL statement to compile |
||
92 | * |
||
93 | * @return string The compiled SQL statement |
||
94 | */ |
||
95 | public function compile($statement) |
||
101 | } |
||
102 |
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.