1 | <?php |
||
34 | class ColumnPlaceholdersUtil implements ColumnPlaceholdersUtiInterface |
||
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 column names of the passed table. |
||
65 | * |
||
66 | * @param string $tableName The table name to return the list for |
||
67 | * |
||
68 | * @return string The concatenated list of column names |
||
69 | */ |
||
70 | 1 | public function getColumnPlaceholders($tableName) |
|
84 | |||
85 | /** |
||
86 | * Compiles the passed SQL statement. |
||
87 | * |
||
88 | * @param string $statement The SQL statement to compile |
||
89 | * |
||
90 | * @return string The compiled SQL statement |
||
91 | */ |
||
92 | public function compile($statement) |
||
98 | } |
||
99 |
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.