Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function getMaxTagId(int $limit):array |
||
21 | { |
||
22 | $connection = $this->getConnection(); |
||
23 | |||
24 | $subSetSelect = $connection->select()->from( |
||
25 | self::TABLE_NAME, |
||
|
|||
26 | ['entity_id','tag'] |
||
27 | )->order( |
||
28 | 'entity_id', |
||
29 | 'ASC' |
||
30 | )->limit( |
||
31 | $limit |
||
32 | ); |
||
33 | |||
34 | $maxIdSelect = $connection->select()->from( |
||
35 | $subSetSelect, |
||
36 | ['max_id'=>'MAX(entity_id)'] |
||
37 | ); |
||
38 | |||
39 | return $connection->fetchRow($maxIdSelect); |
||
40 | } |
||
59 |
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. Please note the @ignore annotation hint above.