Conditions | 5 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
27 | public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) |
||
28 | { |
||
29 | if ((count($this->menuNames) > 0) && null !== $parent && 'KunstmaanAdminBundle_modules' === $parent->getRoute()) { |
||
30 | $menuItem = new TopMenuItem($menu); |
||
31 | $menuItem |
||
32 | ->setRoute('kunstmaanmenubundle_admin_menu') |
||
33 | ->setUniqueId('menus') |
||
34 | ->setLabel('kuma_menu.menus.title') |
||
35 | ->setParent($parent); |
||
36 | if ($request->attributes->get('_route') === 'kunstmaanmenubundle_admin_menu') { |
||
37 | $menuItem->setActive(true); |
||
38 | $parent->setActive(true); |
||
39 | } |
||
40 | $children[] = $menuItem; |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.