Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function __construct(Collection $unknownIncludes, Collection $allowedIncludes) |
||
17 | { |
||
18 | $this->unknownIncludes = $unknownIncludes; |
||
19 | $this->allowedIncludes = $allowedIncludes; |
||
20 | |||
21 | $unknownIncludes = $unknownIncludes->implode(', '); |
||
22 | |||
23 | $message = "Requested include(s) `{$unknownIncludes}` are not allowed. "; |
||
24 | |||
25 | if ($allowedIncludes->count()) { |
||
26 | $allowedIncludes = $allowedIncludes->implode(', '); |
||
27 | $message .= "Allowed include(s) are `{$allowedIncludes}`."; |
||
28 | } else { |
||
29 | $message .= 'There are no allowed includes.'; |
||
30 | } |
||
31 | |||
32 | parent::__construct(Response::HTTP_BAD_REQUEST, $message); |
||
33 | } |
||
34 | |||
40 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.