Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
46 | public function handle($request, Closure $next, $roles, $permissions, $validateAll = false) |
||
47 | { |
||
48 | if ($this->authService->guest() || !$request->user()->ability( |
||
49 | explode('|', $roles), |
||
50 | explode('|', $permissions), |
||
51 | array('validate_all' => $validateAll) |
||
52 | ) |
||
53 | ) { |
||
54 | if ($request->wantsJson()) { |
||
55 | return response('Forbidden.', 403); |
||
56 | } else { |
||
57 | abort(403); |
||
58 | } |
||
59 | } |
||
60 | |||
61 | return $next($request); |
||
62 | } |
||
63 | } |
||
64 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..