@@ -72,7 +72,7 @@ class ContentAwareFactory extends MenuFactory
72
72
/**
73
73
* @param UrlGeneratorInterface $generator for the parent class
74
74
* @param UrlGeneratorInterface $contentRouter to generate routes when
75
- * content is set
75
+ * content is set
76
76
* @param EventDispatcherInterface $dispatcher to dispatch the CREATE_ITEM_FROM_NODE event.
77
77
* @param LoggerInterface $logger
78
78
*/
@@ -136,13 +136,13 @@ private function getVoters()
136
136
}
137
137
138
138
/**
139
- * Create a MenuItem from a NodeInterface instance
139
+ * Create a MenuItem from a NodeInterface instance.
140
140
*
141
141
* @param NodeInterface $node
142
142
*
143
- * @return MenuItem|null if allowEmptyItems is false and this node has
144
- * neither URL nor route nor a content that has a route, this method
145
- * returns null.
143
+ * @return MenuItem|null If allowEmptyItems is false and this node has
144
+ * neither URL nor route nor a content that has a
145
+ * route, returns null.
146
146
*/
147
147
public function createFromNode (NodeInterface $ node )
148
148
{
@@ -202,9 +202,11 @@ public function addChildrenFromNode($nodes, ItemInterface $item)
202
202
*
203
203
* @param string $name the menu item name
204
204
* @param array $options options for the menu item, we care about
205
- * 'content'
205
+ * 'content'
206
206
*
207
- * @return MenuItem|null returns null if no route can be built for this menu item
207
+ * @return MenuItem|null Returns null if no route can be built for this menu item,
208
+ *
209
+ * @throws \RuntimeException If the stored link type is not known.
208
210
*/
209
211
public function createItem ($ name , array $ options = array ())
210
212
{
@@ -303,7 +305,7 @@ protected function determineLinkType($options)
303
305
* @param string $linkType
304
306
*
305
307
* @throws \InvalidArgumentException if $linkType is not one of the known
306
- * link types
308
+ * link types
307
309
*/
308
310
protected function validateLinkType ($ linkType )
309
311
{
0 commit comments