1 | <?php |
||
28 | abstract class AbstractMenuTwigExtension extends AbstractAdminBSBTwigExtension { |
||
29 | |||
30 | /** |
||
31 | * Translator; |
||
32 | * |
||
33 | * @var TranslatorInterface |
||
34 | */ |
||
35 | protected $translator; |
||
36 | |||
37 | /** |
||
38 | * Constructor. |
||
39 | * |
||
40 | * @param TranslatorInterface $translator The translator. |
||
41 | */ |
||
42 | protected function __construct(TranslatorInterface $translator) { |
||
46 | |||
47 | /** |
||
48 | * Displays an AdminBSB menu. |
||
49 | * |
||
50 | * @param NavigationTree $tree The tree. |
||
51 | * @return string Returns the AdminBSB menu. |
||
52 | */ |
||
53 | protected function adminBSBMenu(NavigationTree $tree) { |
||
69 | |||
70 | /** |
||
71 | * Displays an AdminBSB menu header. |
||
72 | * |
||
73 | * @param NavigationTree $tree The tree. |
||
74 | * @return string Returns the AdminBSB menu header. |
||
75 | */ |
||
76 | private function adminBSBMenuHeader(NavigationTree $tree) { |
||
92 | |||
93 | /** |
||
94 | * Displays an AdminBSB menu item. |
||
95 | * |
||
96 | * @param string $content The menu item content. |
||
|
|||
97 | * @param string $url The menu item URL. |
||
98 | * @param string $icon The menu item icon. |
||
99 | * @param boolean $active Menu item active ? |
||
100 | * @param array $nodes The menu item nodes. |
||
101 | * @return string Returns the AdminBSB menu item. |
||
102 | */ |
||
103 | private function adminBSBMenuItem(NavigationNode $node) { |
||
138 | |||
139 | /** |
||
140 | * Displays an AdminBSB menu item label. |
||
141 | * |
||
142 | * @param NavigationNode $node The node. |
||
143 | * @return string Returns the AdminBSB menu label. |
||
144 | */ |
||
145 | private function adminBSBMenuItemLabel(NavigationNode $node) { |
||
164 | |||
165 | /** |
||
166 | * Displays an AdminBSB menu item link. |
||
167 | * |
||
168 | * @param NavigationNode $node The node. |
||
169 | * @param string $class The node class. |
||
170 | * @return string Returns the AdminBSB menu item link. |
||
171 | */ |
||
172 | private function adminBSBMenuItemLink(NavigationNode $node, $class) { |
||
190 | |||
191 | /** |
||
192 | * Determines if a node is valid. |
||
193 | * |
||
194 | * @param mixed $node The node. |
||
195 | * @return boolean Returns true in case of success, false otherwise. |
||
196 | */ |
||
197 | private function isValidNode($node) { |
||
200 | |||
201 | /** |
||
202 | * Translate. |
||
203 | * |
||
204 | * @param string $id The translation id. |
||
205 | * @return string Returns the translation in case of succes, id otherwise. |
||
206 | */ |
||
207 | private function translate($id) { |
||
224 | |||
225 | } |
||
226 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.