1 | <?php |
||
22 | class DoctrineODMPhpcrAdapter implements AdapterInterface |
||
23 | { |
||
24 | private $queryBuilder; |
||
25 | |||
26 | /** |
||
27 | * Constructor. |
||
28 | * |
||
29 | * @param QueryBuilder $queryBuilder A Doctrine PHPCR-ODM query builder. |
||
30 | */ |
||
31 | 3 | public function __construct(QueryBuilder $queryBuilder) |
|
35 | |||
36 | /** |
||
37 | * Returns the query builder. |
||
38 | * |
||
39 | * @return QueryBuilder The query builder. |
||
40 | */ |
||
41 | 1 | public function getQueryBuilder() |
|
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | 1 | public function getNbResults() |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 1 | public function getSlice($offset, $length) |
|
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
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.