Completed
Pull Request — master (#69)
by
unknown
07:45
created
src/MenuItem.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
             if (($title_or_properties['attributes']??null) === null)
169 169
             {
170
-               $title_or_properties['attributes'] = [];
170
+                $title_or_properties['attributes'] = [];
171 171
             }
172 172
 
173 173
             $properties = $title_or_properties;
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
             // if three args are passed in, third must be attributes
181 181
 
182 182
             if (func_num_args() === 3 && is_array($order)) {
183
-               $attributes = $order;
184
-               $properties = compact('title', 'attributes');
183
+                $attributes = $order;
184
+                $properties = compact('title', 'attributes');
185 185
             }
186 186
             else
187 187
             {
188
-               $properties = compact('title', 'order', 'attributes');
188
+                $properties = compact('title', 'order', 'attributes');
189 189
             }
190 190
         }
191 191
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
     {
166 166
         if (is_array($title_or_properties)) {
167 167
 
168
-            if (($title_or_properties['attributes']??null) === null)
168
+            if (($title_or_properties['attributes'] ?? null) === null)
169 169
             {
170 170
                $title_or_properties['attributes'] = [];
171 171
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -171,8 +171,7 @@  discard block
 block discarded – undo
171 171
             }
172 172
 
173 173
             $properties = $title_or_properties;
174
-        }
175
-        else
174
+        } else
176 175
         {
177 176
             $title = $title_or_properties;
178 177
 
@@ -182,8 +181,7 @@  discard block
 block discarded – undo
182 181
             if (func_num_args() === 3 && is_array($order)) {
183 182
                $attributes = $order;
184 183
                $properties = compact('title', 'attributes');
185
-            }
186
-            else
184
+            } else
187 185
             {
188 186
                $properties = compact('title', 'order', 'attributes');
189 187
             }
Please login to merge, or discard this patch.
src/MenuBuilder.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
             if (($title_or_properties['attributes']??null) === null)
359 359
             {
360
-               $title_or_properties['attributes'] = [];
360
+                $title_or_properties['attributes'] = [];
361 361
             }
362 362
 
363 363
             $properties = $title_or_properties;
@@ -370,12 +370,12 @@  discard block
 block discarded – undo
370 370
             // if three args are passed in, third must be attributes
371 371
 
372 372
             if (func_num_args() === 3 && is_array($order)) {
373
-               $attributes = $order;
374
-               $properties = compact('title', 'attributes');
373
+                $attributes = $order;
374
+                $properties = compact('title', 'attributes');
375 375
             }
376 376
             else
377 377
             {
378
-               $properties = compact('title', 'order', 'attributes');
378
+                $properties = compact('title', 'order', 'attributes');
379 379
             }
380 380
 
381 381
             $properties = compact('title', 'order', 'attributes');
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function findBy($key, $value)
127 127
     {
128
-        return collect($this->items)->filter(function ($item) use ($key, $value) {
128
+        return collect($this->items)->filter(function($item) use ($key, $value) {
129 129
             return $item->{$key} == $value;
130 130
         })->first();
131 131
     }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     protected function resolveItems(array &$items)
312 312
     {
313
-        $resolver = function ($property) {
313
+        $resolver = function($property) {
314 314
             return $this->resolve($property) ?: $property;
315 315
         };
316 316
 
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     {
356 356
         if (is_array($title_or_properties)) {
357 357
 
358
-            if (($title_or_properties['attributes']??null) === null)
358
+            if (($title_or_properties['attributes'] ?? null) === null)
359 359
             {
360 360
                $title_or_properties['attributes'] = [];
361 361
             }
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
     public function getOrderedItems()
639 639
     {
640 640
         if (config('menus.ordering') || $this->ordering) {
641
-            return $this->toCollection()->sortBy(function ($item) {
641
+            return $this->toCollection()->sortBy(function($item) {
642 642
                 return $item->order;
643 643
             })->all();
644 644
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -361,8 +361,7 @@  discard block
 block discarded – undo
361 361
             }
362 362
 
363 363
             $properties = $title_or_properties;
364
-        }
365
-        else
364
+        } else
366 365
         {
367 366
             $title = $title_or_properties;
368 367
 
@@ -372,8 +371,7 @@  discard block
 block discarded – undo
372 371
             if (func_num_args() === 3 && is_array($order)) {
373 372
                $attributes = $order;
374 373
                $properties = compact('title', 'attributes');
375
-            }
376
-            else
374
+            } else
377 375
             {
378 376
                $properties = compact('title', 'order', 'attributes');
379 377
             }
Please login to merge, or discard this patch.