1 | <?php |
||
2 | |||
3 | namespace Bdf\Prime\Query; |
||
4 | |||
5 | use Bdf\Prime\Exception\PrimeException; |
||
6 | use Bdf\Prime\Query\Contract\ReadOperation; |
||
7 | |||
8 | /** |
||
9 | * Extension for compatibility purposes |
||
10 | */ |
||
11 | class QueryCompatExtension |
||
12 | { |
||
13 | /** |
||
14 | * @param QueryInterface $query |
||
15 | * @param $flag |
||
16 | * |
||
17 | * @return QueryInterface |
||
18 | */ |
||
19 | public function ignore(QueryInterface $query, $flag = true) |
||
0 ignored issues
–
show
|
|||
20 | { |
||
21 | return $query; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param QueryInterface $query |
||
26 | * @param null|array $attributes |
||
27 | * |
||
28 | * @return int |
||
29 | * @throws PrimeException |
||
30 | */ |
||
31 | #[ReadOperation] |
||
32 | public function count(QueryInterface $query, $attributes = null) |
||
33 | { |
||
34 | return count($query->all($attributes)); |
||
35 | } |
||
36 | } |
||
37 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.