Completed
Push — master ( a05ccf...7a68f4 )
by Benjamin
10:51 queued 03:54
created
Builder/MenuBuilder.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * The parameter $locale must be defined in your
49 49
      * symfony configuration file under parameters.
50 50
      *
51
-     * @param $locale String
51
+     * @param string $locale String
52 52
      * @return $this
53 53
      */
54 54
     public function setDefaultLocale($locale)
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     /**
79 79
      * Check if the machineName is valid
80 80
      *
81
-     * @param $machineName
81
+     * @param string $machineName
82 82
      * @return bool
83 83
      */
84 84
     public static function isValidMachineName($machineName)
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     /**
94 94
      * Retrun null or a KnpMenuItem instance
95 95
      *
96
-     * @return null|KnpMenuItem
96
+     * @return KnpMenuItem
97 97
      */
98 98
     public function getKnpMenu()
99 99
     {
Please login to merge, or discard this patch.
Entity/Item.php 1 patch
Doc Comments   +2 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
      */
@@ -209,6 +208,7 @@  discard block
 block discarded – undo
209 208
      * Set name displayed in Item
210 209
      *
211 210
      * @param string
211
+     * @param string $name
212 212
      *
213 213
      * @return self
214 214
      */
@@ -232,7 +232,6 @@  discard block
 block discarded – undo
232 232
     /**
233 233
      * Set URL
234 234
      *
235
-     * @param string $url
236 235
      *
237 236
      * @return self
238 237
      */
Please login to merge, or discard this patch.
Entity/Menu.php 1 patch
Doc Comments   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,6 +87,7 @@  discard block
 block discarded – undo
87 87
      * Set the machineName the key for querying a menu.
88 88
      *
89 89
      * @param string
90
+     * @param string $machineName
90 91
      *
91 92
      * @return self
92 93
      */
@@ -100,7 +101,7 @@  discard block
 block discarded – undo
100 101
     /**
101 102
      * Get the name the value displayed to the administrator.
102 103
      *
103
-     * @return self
104
+     * @return string
104 105
      */
105 106
     public function getName()
106 107
     {
@@ -110,6 +111,7 @@  discard block
 block discarded – undo
110 111
     /**
111 112
      * Set the name the value displayed to the administrator.
112 113
      *
114
+     * @param string $name
113 115
      * @return self
114 116
      */
115 117
     public function setName($name)
@@ -167,9 +169,9 @@  discard block
 block discarded – undo
167 169
     /**
168 170
      * Set items for the menu.
169 171
      * @deprecated
170
-     * @param null\ItemInterface $item
172
+     * @param ItemInterface $item
171 173
      *
172
-     * @return Item
174
+     * @return Menu
173 175
      */
174 176
     public function setItem(ItemInterface $item)
175 177
     {
@@ -179,9 +181,9 @@  discard block
 block discarded – undo
179 181
     /**
180 182
      * Set items for the menu.
181 183
      *
182
-     * @param null\ItemInterface $item
184
+     * @param ItemInterface $item
183 185
      *
184
-     * @return Item
186
+     * @return Menu
185 187
      */
186 188
     public function addItem(ItemInterface $item)
187 189
     {
@@ -204,6 +206,7 @@  discard block
 block discarded – undo
204 206
     /**
205 207
      * Set the locale language.
206 208
      *
209
+     * @param string $locale
207 210
      * @return self
208 211
      */
209 212
     public function setLocale($locale)
Please login to merge, or discard this patch.
Tests/Builder/MenuBuilderTest.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -74,6 +74,9 @@  discard block
 block discarded – undo
74 74
         $this->assertInstanceOf(MenuItem::class, $knpMenu);
75 75
     }
76 76
 
77
+    /**
78
+     * @param string $locale
79
+     */
77 80
     public function getMenuContext($locale)
78 81
     {
79 82
         $menuData = $this->getMenuData()[$locale];
@@ -103,6 +106,9 @@  discard block
 block discarded – undo
103 106
         return $menu;
104 107
     }
105 108
 
109
+    /**
110
+     * @param integer $i
111
+     */
106 112
     public function newItem(Menu $menu, $i, Item $parentItem = null)
107 113
     {
108 114
         $item = new Item();
Please login to merge, or discard this patch.
DependencyInjection/AlpixelMenuExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     public function prepend(ContainerBuilder $container)
39 39
     {
40 40
         $parser = new Parser();
41
-        $config = $parser->parse(file_get_contents(__DIR__ . '/../Resources/config/config.yml'));
41
+        $config = $parser->parse(file_get_contents(__DIR__.'/../Resources/config/config.yml'));
42 42
 
43 43
         foreach ($config as $key => $configuration) {
44 44
             $container->prependExtensionConfig($key, $configuration);
Please login to merge, or discard this patch.
Controller/Admin/CRUD/ItemAdmin.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
                     $qb = $repository->createQueryBuilder('i');
137 137
 
138 138
                     if ($parentItem->getParent() === null) {
139
-                         return $qb->where('i.parent IS NULL')
140
-                             ->andWhere('i.menu = :id')
141
-                             ->setParameter('id', $parentItem->getMenu());
139
+                            return $qb->where('i.parent IS NULL')
140
+                                ->andWhere('i.menu = :id')
141
+                                ->setParameter('id', $parentItem->getMenu());
142 142
                     }
143 143
 
144 144
                     return $qb->where('i.id IN (:ids)')
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $uriType = $request->request->get('uri_type');
210 210
         if (empty($uriType) || !in_array($uriType, [Item::URI_TYPE_EXTERNAL, Item::URI_TYPE_INTERNAL])) {
211 211
             $form->get('uri')->addError(new FormError(
212
-               'Le type d\'url est invalide !'
212
+                'Le type d\'url est invalide !'
213 213
             ));
214 214
 
215 215
             return;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $idItem = null;
88 88
         $idMenu = null;
89
-        if($request->query->has('uniqid')) {
89
+        if ($request->query->has('uniqid')) {
90 90
             $formId = $request->query->get('uniqid');
91 91
             if ($request->request->has($formId)) {
92 92
                 $formData = $request->request->get($formId);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 'label'         => 'Menu',
111 111
                 'required'      => true,
112 112
                 'property'      => 'name',
113
-                'query_builder' => function (EntityRepository $entityRepository) use ($idMenu) {
113
+                'query_builder' => function(EntityRepository $entityRepository) use ($idMenu) {
114 114
                     $query = $entityRepository->createQuerybuilder('m');
115 115
                     if ($idMenu === null) {
116 116
                         return $query;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 'required'      => true,
133 133
                 'property'      => 'name',
134 134
                 'data'          => $parentItem,
135
-                'query_builder' => function (EntityRepository $repository) use ($parentItem) {
135
+                'query_builder' => function(EntityRepository $repository) use ($parentItem) {
136 136
                     $qb = $repository->createQueryBuilder('i');
137 137
 
138 138
                     if ($parentItem->getParent() === null) {
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
     public function checkUri($object = null)
202 202
     {
203
-        if($object === null) {
203
+        if ($object === null) {
204 204
             return;
205 205
         }
206 206
 
Please login to merge, or discard this patch.
Menu/Menu.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     }
99 99
 
100 100
     /**
101
-     * @return array An array of available delete strategies
101
+     * @return string[] An array of available delete strategies
102 102
      */
103 103
     public static function getDeleteStrategiesAvailable()
104 104
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     public static function getDeleteStrategiesAvailable()
104 104
     {
105 105
         return [
106
-          self::DELETE_STRATEGY_MOVE_CHILDREN,
106
+            self::DELETE_STRATEGY_MOVE_CHILDREN,
107 107
         ];
108 108
     }
109 109
 }
Please login to merge, or discard this patch.