Completed
Push — master ( 6db110...3d72e1 )
by Tomas Norre
16:02
created
Classes/Task/GolfCoursesCoordinatesTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
         foreach ($golfCoursesWithOutCoordinates as $golfCourse) {
58 58
             $coordinates = GoogleCoordinatesService::getCoordinates($golfCourse->getName());
59 59
             if (!empty($coordinates)) {
60
-                $golfCourse->setLatitude((string)$coordinates['latitude']);
61
-                $golfCourse->setLongitude((string)$coordinates['longitude']);
60
+                $golfCourse->setLatitude((string) $coordinates['latitude']);
61
+                $golfCourse->setLongitude((string) $coordinates['longitude']);
62 62
                 $this->golfCourseRepository->update($golfCourse);
63 63
             }
64 64
         }
Please login to merge, or discard this patch.
Classes/Service/GoogleCoordinatesService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
      * @return array
39 39
      * @codeCoverageIgnore
40 40
      */
41
-    public static function getCoordinates($address){
41
+    public static function getCoordinates($address) {
42 42
 
43
-        if(empty($address)) {
43
+        if (empty($address)) {
44 44
             return [];
45 45
         }
46 46
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $response = file_get_contents($url);
53 53
 
54 54
         //generate array object from the response from the web
55
-        $json = json_decode($response,TRUE);
55
+        $json = json_decode($response, TRUE);
56 56
 
57 57
         return [
58 58
             'longitude' => $json['results'][0]['geometry']['location']['lng'],
Please login to merge, or discard this patch.