Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
5 | class Callbacks |
||
6 | { |
||
7 | 4 | public function closureAllows($emptyString, $callback, $parameters = []) |
|
14 | 6 | } |
|
15 | 6 | ||
16 | 6 | public function methodAllows($emptyString, $callback, array $parameters = []) |
|
|
|||
17 | { |
||
18 | // it is not clear why laravel passes the $emptyString as the first parameter here. |
||
19 | // check Imanghafoori\HeyMan\Conditions\ConditionsFacade class line 12; |
||
20 | |||
21 | 82 | return function (...$payload) use ($callback, $parameters) { |
|
22 | 54 | return (bool) app()->call($callback, array_merge($parameters, ...$payload)); |
|
23 | 82 | }; |
|
24 | } |
||
25 | |||
26 | public function valueAllows($value) |
||
30 | }; |
||
31 | } |
||
33 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.