Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
17 | public function handle($permissions): bool |
||
18 | { |
||
19 | if ($this->auth->check()) { |
||
20 | return $this->auth->user()->canAtLeast((array) $permissions); |
||
|
|||
21 | } |
||
22 | |||
23 | $guest = Role::whereSlug('guest')->first(); |
||
24 | if ($guest) { |
||
25 | return $guest->canAtLeast((array) $permissions); |
||
26 | } |
||
27 | |||
28 | return false; |
||
29 | } |
||
30 | } |
||
31 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.