Passed
Push — master ( affe64...6c9189 )
by Jason
02:51
created
src/objects/LocationCategory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      */
60 60
     public function getCMSFields()
61 61
     {
62
-        $this->beforeUpdateCMSFields(function ($fields) {
62
+        $this->beforeUpdateCMSFields(function($fields) {
63 63
             $fields->removeByName([
64 64
                 'Locations',
65 65
                 'LocationSet',
Please login to merge, or discard this patch.
src/pages/Locator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     public function getCMSFields()
72 72
     {
73
-        $this->beforeUpdateCMSFields(function ($fields) {
73
+        $this->beforeUpdateCMSFields(function($fields) {
74 74
             // Settings
75 75
             $fields->addFieldsToTab('Root.Settings', array(
76 76
                 HeaderField::create('DisplayOptions', 'Display Options', 3),
Please login to merge, or discard this patch.
src/pages/LocatorController.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         parent::init();
84 84
         // google maps api key
85 85
         $key = Config::inst()->get(GoogleGeocoder::class, 'geocoder_api_key');
86
-        Requirements::javascript('https://maps.google.com/maps/api/js?key=' . $key);
86
+        Requirements::javascript('https://maps.google.com/maps/api/js?key='.$key);
87 87
 
88 88
         // prevent init of map if no query
89 89
         $request = Controller::curr()->getRequest();
@@ -94,8 +94,7 @@  discard block
 block discarded – undo
94 94
             if ($locations) {
95 95
                 $featuredInList = ($locations->filter('Featured', true)->count() > 0);
96 96
                 $defaultCoords = $this->getAddressSearchCoords() ?
97
-                    $this->getAddressSearchCoords() :
98
-                    new ArrayData([
97
+                    $this->getAddressSearchCoords() : new ArrayData([
99 98
                         "Lat" => 0,
100 99
                         "Lng" => 0,
101 100
                     ]);
@@ -109,7 +108,7 @@  discard block
 block discarded – undo
109 108
                 if ($limit < 1) {
110 109
                     $limit = -1;
111 110
                 }
112
-                $load = 'fullMapStart: true, storeLimit: ' . $limit . ', maxDistance: true,';
111
+                $load = 'fullMapStart: true, storeLimit: '.$limit.', maxDistance: true,';
113 112
 
114 113
                 $listTemplatePath = $this->getListTemplate();
115 114
                 $infowindowTemplatePath = $this->getInfoWindowTemplate();
@@ -121,7 +120,7 @@  discard block
 block discarded – undo
121 120
                 unset($vars['url']);
122 121
                 $url = '';
123 122
                 if (count($vars)) {
124
-                    $url .= '?' . http_build_query($vars);
123
+                    $url .= '?'.http_build_query($vars);
125 124
                 }
126 125
                 $link = Controller::join_links($this->Link(), 'xml.xml', $url);
127 126
 
@@ -247,8 +246,8 @@  discard block
 block discarded – undo
247 246
         if ($this->getShowRadius()) {
248 247
             $radiusVar = Config::inst()->get(Locator::class, 'radius_var');
249 248
 
250
-            if ($radius = (int)$request->getVar($radiusVar)) {
251
-                $locations = $locations->filterByCallback(function ($location) use (&$radius) {
249
+            if ($radius = (int) $request->getVar($radiusVar)) {
250
+                $locations = $locations->filterByCallback(function($location) use (&$radius) {
252 251
                     return $location->Distance <= $radius;
253 252
                 });
254 253
             }
Please login to merge, or discard this patch.