| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function search(User $user, int $page = 1, string $query = null, int $size = 20) |
||
| 13 | { |
||
| 14 | $skip = ($page * $size) - $size; |
||
| 15 | $skip = $skip < 0 ? 0 : $skip; |
||
| 16 | |||
| 17 | $qb = $this->createQueryBuilder() |
||
| 18 | ->limit($size) |
||
| 19 | ->skip($skip); |
||
| 20 | |||
| 21 | $this->addSearch($qb, $user, $query); |
||
| 22 | |||
| 23 | return $qb->getQuery()->execute(); |
||
| 24 | } |
||
| 46 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.