These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\AdminBundle\Twig; |
||
4 | |||
5 | use Kunstmaan\NodeBundle\Entity\HideSidebarInNodeEditInterface; |
||
6 | use Kunstmaan\AdminBundle\Helper\Menu\MenuBuilder; |
||
7 | |||
8 | class SidebarTwigExtension extends \Twig_Extension |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * Get Twig functions defined in this extension. |
||
13 | * |
||
14 | * @return array |
||
0 ignored issues
–
show
|
|||
15 | */ |
||
16 | public function getFunctions() |
||
17 | { |
||
18 | return array( |
||
19 | new \Twig_SimpleFunction('hideSidebarInNodeEditAdmin', array($this, 'hideSidebarInNodeEditAdmin')), |
||
20 | ); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Return the admin menu MenuBuilder. |
||
25 | * |
||
26 | * @return MenuBuilder |
||
0 ignored issues
–
show
|
|||
27 | */ |
||
28 | public function hideSidebarInNodeEditAdmin($node) |
||
29 | { |
||
30 | return ($node instanceof HideSidebarInNodeEditInterface); |
||
31 | } |
||
32 | |||
33 | } |
||
34 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.