| Conditions | 3 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | private function checkMenuPermission($list) |
||
| 32 | { |
||
| 33 | $return = $list->filter(function ($permission, $key) { |
||
|
|
|||
| 34 | if (Auth::user()->can($permission->name)) { |
||
| 35 | if (!$permission->child->isEmpty()) { |
||
| 36 | $permission->child = $this->checkMenuPermission($permission->child); |
||
| 37 | } |
||
| 38 | $permission->url = $this->getRouteUrl($permission); |
||
| 39 | return $permission; |
||
| 40 | } |
||
| 41 | }); |
||
| 42 | |||
| 43 | return $return; |
||
| 44 | } |
||
| 45 | |||
| 56 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.