| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function index() |
||
| 11 | { |
||
| 12 | $this->authorize('view-page'); |
||
| 13 | |||
| 14 | $menus = Menu::all(); |
||
| 15 | |||
| 16 | // If there is only one menu, we will show the menu immediately. |
||
| 17 | if ($menus->count() == 1) { |
||
| 18 | return $this->show($menus->first()->key()); |
||
| 19 | } |
||
| 20 | |||
| 21 | return view('chief::admin.menu.index', [ |
||
| 22 | 'menus' => $menus, |
||
| 23 | ]); |
||
| 41 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.