Completed
Branch master (fa3d71)
by Vojta
02:14
created
Plugin.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,13 +71,15 @@
 block discarded – undo
71 71
         });
72 72
 
73 73
         Event::listen('pages.menuitem.getTypeInfo', function($type) {
74
-            if ($type == 'location-town' || $type == 'all-location-towns')
75
-                return Town::getMenuTypeInfo($type);
74
+            if ($type == 'location-town' || $type == 'all-location-towns') {
75
+                            return Town::getMenuTypeInfo($type);
76
+            }
76 77
         });
77 78
 
78 79
         Event::listen('pages.menuitem.resolveItem', function($type, $item, $url, $theme) {
79
-            if ($type == 'location-town' || $type == 'all-location-towns')
80
-                return Town::resolveMenuItem($item, $url, $theme);
80
+            if ($type == 'location-town' || $type == 'all-location-towns') {
81
+                            return Town::resolveMenuItem($item, $url, $theme);
82
+            }
81 83
         });
82 84
     }
83 85
 }
Please login to merge, or discard this patch.
models/Town.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,7 @@
 block discarded – undo
119 119
             $result['url'] = URL::to('/kontakty/' . $stateCode . '/' . $town->slug);
120 120
             $result['isActive'] = false;
121 121
             $result['mtime'] = $town->updated_at;
122
-        }
123
-        elseif ($item->type == 'all-location-towns') {
122
+        } elseif ($item->type == 'all-location-towns') {
124 123
             $result = [
125 124
                 'items' => []
126 125
             ];
Please login to merge, or discard this patch.