| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function __construct(string $unknownSort, Collection $allowedSorts) |
||
| 17 | { |
||
| 18 | $this->unknownSort = $unknownSort; |
||
| 19 | $this->allowedSorts = $allowedSorts; |
||
| 20 | |||
| 21 | $allowedSorts = $allowedSorts->implode(', '); |
||
| 22 | $message = "Given sort `{$this->unknownSort}` is not allowed. Allowed sorts are `{$allowedSorts}`."; |
||
| 23 | |||
| 24 | parent::__construct(Response::HTTP_BAD_REQUEST, $message); |
||
| 25 | } |
||
| 26 | |||
| 42 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.