Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
10 | 5 | public function find(int $id) |
|
11 | { |
||
12 | 5 | $permission = $this->query()->find($id); |
|
13 | |||
14 | 5 | if (null === $permission) { |
|
15 | 1 | return; |
|
16 | } |
||
17 | |||
18 | 4 | $permission = app('mage.permissions')::fromArray([ |
|
|
|||
19 | 4 | 'id' => $permission->id, |
|
20 | 4 | 'name' => $permission->name, |
|
21 | 4 | 'guard_name' => $permission->guard_name, |
|
22 | 4 | 'created_at' => $permission->created_at, |
|
23 | 4 | 'updated_at' => $permission->updated_at, |
|
24 | ]); |
||
25 | |||
26 | 4 | return $permission; |
|
27 | } |
||
29 |
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.