Completed
Branch master (955ba9)
by Gabriel
04:40
created
src/CountryRepository.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@
 block discarded – undo
46 46
     {
47 47
         if (!isset(self::$items[$shortCode])) {
48 48
             $country = self::getLoader()->loadCountry($shortCode);
49
-            if (!$country) return null;
49
+            if (!$country) {
50
+                return null;
51
+            }
50 52
             return self::$items[$shortCode] = self::getMapper()->mapArrayToEntity($country);
51 53
         }
52 54
         return self::$items[$shortCode];
Please login to merge, or discard this patch.
src/Country/CountryLoader.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     public function loadCountry($country)
39 39
     {
40 40
         if (!$country) return null;
41
-         $file = $this->path . DIRECTORY_SEPARATOR . sprintf(self::COUNTRY_FILE, $country);
41
+            $file = $this->path . DIRECTORY_SEPARATOR . sprintf(self::COUNTRY_FILE, $country);
42 42
         if (!file_exists($file)) return null;
43 43
 
44 44
         return json_decode(
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,9 +37,13 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function loadCountry($country)
39 39
     {
40
-        if (!$country) return null;
40
+        if (!$country) {
41
+            return null;
42
+        }
41 43
          $file = $this->path . DIRECTORY_SEPARATOR . sprintf(self::COUNTRY_FILE, $country);
42
-        if (!file_exists($file)) return null;
44
+        if (!file_exists($file)) {
45
+            return null;
46
+        }
43 47
 
44 48
         return json_decode(
45 49
             file_get_contents($file),
@@ -53,9 +57,13 @@  discard block
 block discarded – undo
53 57
      */
54 58
     public function loadCountryPolygon($country)
55 59
     {
56
-        if (!$country) return null;
60
+        if (!$country) {
61
+            return null;
62
+        }
57 63
         $file = $this->path . DIRECTORY_SEPARATOR . sprintf(self::COUNTRY_POLYGON_FILE, $country);
58
-        if (!file_exists($file)) return null;
64
+        if (!file_exists($file)) {
65
+            return null;
66
+        }
59 67
 
60 68
         return json_decode(
61 69
             file_get_contents($file),
Please login to merge, or discard this patch.