Completed
Push — master ( 2abc3b...5aa123 )
by Alexis
16:40
created
src/Alpixel/Bundle/MenuBundle/Builder/MenuBuilder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
     /**
70 70
      * Check if the machineName is valid
71 71
      *
72
-     * @param $machineName
72
+     * @param string $machineName
73 73
      * @return bool
74 74
      */
75 75
     public static function isValidMachineNamme($machineName)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function setDefaultLocale($locale)
56 56
     {
57
-        if(self::isValidLocale($locale)) {
57
+        if (self::isValidLocale($locale)) {
58 58
             $this->defaultLocale = $locale;
59 59
 
60 60
             return $this;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         $this->setKnpMenu($this->factory->createItem('root'));
132 132
         foreach ($items as $item) {
133
-            if($item->getParent() === null) {
133
+            if ($item->getParent() === null) {
134 134
                 $this->getTree($this->knpMenu, $item);
135 135
             }
136 136
         }
Please login to merge, or discard this patch.
src/Alpixel/Bundle/MenuBundle/Entity/Item.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     /**
116 116
      * Get parent Item
117 117
      *
118
-     * @return null\Item
118
+     * @return null|ItemInterface
119 119
      */
120 120
     public function getParent()
121 121
     {
@@ -125,7 +125,6 @@  discard block
 block discarded – undo
125 125
     /**
126 126
      * Set parent Item
127 127
      *
128
-     * @param ItemInterface $menu
129 128
      *
130 129
      * @return self
131 130
      */
@@ -216,7 +215,6 @@  discard block
 block discarded – undo
216 215
     /**
217 216
      * Set URL
218 217
      *
219
-     * @param string $url
220 218
      *
221 219
      * @return self
222 220
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
     public function addChildren(ArrayCollection $collection = null)
158 158
     {
159 159
         foreach ($collection as $item) {
160
-            if($this->chidlren->contains($item) === false) {
160
+            if ($this->chidlren->contains($item) === false) {
161 161
                 $this->setChidlren($item);
162 162
             }
163 163
         }
Please login to merge, or discard this patch.
src/Alpixel/Bundle/MenuBundle/Entity/Menu.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     /**
101 101
      * Get the name the value displayed to the administrator
102 102
      *
103
-     * @return self
103
+     * @return string
104 104
      */
105 105
     public function getName()
106 106
     {
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
     /**
167 167
      * Set items for the menu
168 168
      *
169
-     * @param null\ItemInterface $item
169
+     * @param ItemInterface $item
170 170
      *
171
-     * @return Item
171
+     * @return Menu
172 172
      */
173 173
     public function setItem(ItemInterface $item)
174 174
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function removeItem(ItemInterface $item)
140 140
     {
141
-        if($this->items->contains($item) === true) {
141
+        if ($this->items->contains($item) === true) {
142 142
             $this->items->remove($item);
143 143
         }
144 144
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     public function addItems(ArrayCollection $items)
156 156
     {
157 157
         foreach ($items as $item) {
158
-            if($this->items->contains($item) === false) {
158
+            if ($this->items->contains($item) === false) {
159 159
                 $this->setItem($item);
160 160
             }
161 161
         }
Please login to merge, or discard this patch.
src/Alpixel/Bundle/MenuBundle/Model/ItemInterface.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * Get menu
20 20
      *
21
-     * @return Menu
21
+     * @return \Alpixel\Bundle\MenuBundle\Entity\Menu
22 22
      */
23 23
     public function getMenu();
24 24
 
25 25
     /**
26 26
      * Set menu
27 27
      *
28
-     * @param Menu|\Alpixel\Bundle\MenuBundle\Model\MenuInterface $menu
28
+     * @param MenuInterface $menu
29 29
      * @return \Alpixel\Bundle\MenuBundle\Model\ItemInterface
30 30
      */
31 31
     public function setMenu(MenuInterface $menu);
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * Get parent Item
35 35
      *
36
-     * @return null\Item
36
+     * @return null|ItemInterface
37 37
      */
38 38
     public function getParent();
39 39
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * Set chidlren of Item
69 69
      *
70
-     * @param Item|\Alpixel\Bundle\MenuBundle\Model\ItemInterface $item
70
+     * @param ItemInterface $item
71 71
      * @return \Alpixel\Bundle\MenuBundle\Model\ItemInterface
72 72
      */
73 73
     public function setChidlren(ItemInterface $item);
@@ -98,7 +98,6 @@  discard block
 block discarded – undo
98 98
     /**
99 99
      * Set URL
100 100
      *
101
-     * @param string $url
102 101
      *
103 102
      * @return self
104 103
      */
Please login to merge, or discard this patch.
src/Alpixel/Bundle/MenuBundle/Twig/MenuExtension.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Twig_Environment;
7 7
 use Twig_Extension;
8 8
 use Twig_SimpleFunction;
9
-use UnexpectedValueException;
10 9
 
11 10
 class MenuExtension extends Twig_Extension
12 11
 {
Please login to merge, or discard this patch.
src/Alpixel/Bundle/MenuBundle/DependencyInjection/AlpixelMenuExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
         $configuration = new Configuration();
28 28
         $this->processConfiguration($configuration, $configs);
29 29
 
30
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
31 31
         $loader->load('services.yml');
32 32
 
33 33
         $menuBuilder = $container->getDefinition('alpixel_menu.builder');
34
-        $menuBuilder->addMethodCall('setDefaultLocale', [$container->getParameter('locale')] );
34
+        $menuBuilder->addMethodCall('setDefaultLocale', [$container->getParameter('locale')]);
35 35
     }
36 36
 }
Please login to merge, or discard this patch.