Passed
Push — enhancement/more-config-option... ( 58b9a6...e4871a )
by Matthew
05:09 queued 01:57
created
src/bulkloader/LocationCsvBulkLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         $val = $this->getEscape($val);
73 73
         $countries = IntlLocales::singleton()->getCountries();
74 74
 
75
-        if (strlen((string)$val) == 2) {
75
+        if (strlen((string) $val) == 2) {
76 76
             $val = strtolower($val);
77 77
             if (array_key_exists($val, $countries)) {
78 78
                 $obj->Country = $val;
Please login to merge, or discard this patch.
src/Page/LocatorController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
         // google maps api key
101 101
         $key = Config::inst()->get(GoogleGeocoder::class, 'map_api_key');
102
-        Requirements::javascript('https://maps.google.com/maps/api/js?key=' . $key);
102
+        Requirements::javascript('https://maps.google.com/maps/api/js?key='.$key);
103 103
 
104 104
         $mapSettings = [
105 105
             'fullMapStart' => true,
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         unset($vars['url']);
148 148
         $url = '';
149 149
         if (count($vars)) {
150
-            $url .= '?' . http_build_query($vars);
150
+            $url .= '?'.http_build_query($vars);
151 151
         }
152 152
         $mapSettings['dataLocation'] = Controller::join_links($this->Link(), 'xml.xml', $url);
153 153
 
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
         if ($this->getShowRadius()) {
250 250
             $radiusVar = $this->data()->config()->get('radius_var');
251 251
 
252
-            if ($radius = (int)$request->getVar($radiusVar)) {
253
-                $locations = $locations->filterByCallback(function ($location) use (&$radius) {
252
+            if ($radius = (int) $request->getVar($radiusVar)) {
253
+                $locations = $locations->filterByCallback(function($location) use (&$radius) {
254 254
                     return $location->Distance <= $radius;
255 255
                 });
256 256
             }
Please login to merge, or discard this patch.
src/Tasks/LocationPublishTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             $class = 'Location';
56 56
         }
57 57
         $ct = 0;
58
-        $publish = function ($location) use (&$ct) {
58
+        $publish = function($location) use (&$ct) {
59 59
             if (!$location->isPublished()) {
60 60
                 $title = $location->Title;
61 61
                 $location->writeToStage('Stage');
Please login to merge, or discard this patch.
src/Tasks/LocationCategoriesTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
         $categories = [];
43 43
 
44
-        $convert = function (DataObject $location) use (&$categories) {
44
+        $convert = function(DataObject $location) use (&$categories) {
45 45
             /** @var Location $location */
46 46
             // skip if no category
47 47
             if ($location->CategoryID > 0) {
Please login to merge, or discard this patch.
src/Model/LocationCategory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
      */
64 64
     public function getCMSFields()
65 65
     {
66
-        $this->beforeUpdateCMSFields(function (FieldList $fields) {
66
+        $this->beforeUpdateCMSFields(function(FieldList $fields) {
67 67
             $fields->removeByName([
68 68
                 'Locations',
69 69
                 'LocationSet',
Please login to merge, or discard this patch.
src/Model/Location.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
      */
179 179
     public function getCMSFields()
180 180
     {
181
-        $this->beforeUpdateCMSFields(function ($fields) {
181
+        $this->beforeUpdateCMSFields(function($fields) {
182 182
             $fields->removeByName([
183 183
                 'Import_ID',
184 184
                 'LinkTracking',
Please login to merge, or discard this patch.
tests/Model/LocationTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function testGetCoords()
24 24
     {
25 25
         $location = $this->objFromFixture(Location::class, 'dynamic');
26
-        $coords = ((int)$location->Lat != 0 && (int)$location->Lng != 0) ? 'true' : 'false';
26
+        $coords = ((int) $location->Lat != 0 && (int) $location->Lng != 0) ? 'true' : 'false';
27 27
         $this->assertEquals($coords, $location->getCoords());
28 28
     }
29 29
 
Please login to merge, or discard this patch.
src/Page/Locator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      */
72 72
     public function getCMSFields()
73 73
     {
74
-        $this->beforeUpdateCMSFields(function ($fields) {
74
+        $this->beforeUpdateCMSFields(function($fields) {
75 75
             // Settings
76 76
             $fields->addFieldsToTab('Root.Settings', [
77 77
                 HeaderField::create('DisplayOptions', 'Display Options', 3),
Please login to merge, or discard this patch.
src/Tasks/EmailAddressTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         Config::modify()->set('DataObject', 'validation_enabled', false);
32 32
 
33 33
         $ct = 0;
34
-        $updateEmail = function ($location) use (&$ct) {
34
+        $updateEmail = function($location) use (&$ct) {
35 35
             if (!$location->Email && $location->EmailAddress) {
36 36
                 $location->Email = $location->EmailAddress;
37 37
                 $location->write();
@@ -42,6 +42,6 @@  discard block
 block discarded – undo
42 42
         Location::get()->each($updateEmail);
43 43
         Config::modify()->set('DataObject', 'validation_enabled', true);
44 44
 
45
-        echo '<p>' . $ct . ' Locations updated</p>';
45
+        echo '<p>'.$ct.' Locations updated</p>';
46 46
     }
47 47
 }
Please login to merge, or discard this patch.