Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | public function getMenuWithDropDownWrapper(MenuItemContract $item): ?string |
||
21 | { |
||
22 | return '<li class="dropdown pull-right"> |
||
23 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"> |
||
24 | ' . $item->getIcon() . ' ' . $item->title . ' |
||
25 | <b class="caret"></b> |
||
26 | </a> |
||
27 | <ul class="dropdown-menu"> |
||
28 | ' . $this->getChildMenuItems($item) . ' |
||
29 | </ul> |
||
30 | </li>' |
||
31 | . PHP_EOL; |
||
32 | } |
||
34 |
This check compares calls to functions or methods with their respective definitions. If the call has less 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.