| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function getCanAttribute() |
||
| 21 | { |
||
| 22 | $permissions = []; |
||
| 23 | foreach (Permission::all() as $permission) { |
||
| 24 | if (Auth::check() && Auth::user()->can($permission->name)) { |
||
| 25 | $permissions[$permission->name] = true; |
||
| 26 | } else { |
||
| 27 | $permissions[$permission->name] = false; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | return $permissions; |
||
| 31 | } |
||
| 32 | |||
| 42 | } |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.