Test Setup Failed
Branch dev (451d27)
by Someshwer
02:38
created
src/Utils/Wonders.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     private function formatWonders($wonders)
71 71
     {
72
-        return collect($wonders)->transform(function ($item, $key) {
72
+        return collect($wonders)->transform(function($item, $key) {
73 73
             $data['name'] = $key;
74 74
             $data['display_name'] = str_replace('_', ' ', title_case($key));
75 75
             $data['location'] = str_replace('_', ' ', title_case($item));
Please login to merge, or discard this patch.
src/Utils/Continents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
      */
77 77
     private function formatContinents($continents)
78 78
     {
79
-        return collect($continents)->transform(function ($item) {
79
+        return collect($continents)->transform(function($item) {
80 80
             $data['name'] = $item;
81 81
             $data['display_name'] = str_replace('_', ' ', title_case($item));
82 82
             $data['also_called_as'] = ($item == 'australia') ? 'Oceania' : null;
Please login to merge, or discard this patch.
src/Utils/Oceans.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     private function formatOceans($oceans)
75 75
     {
76
-        return collect($oceans)->transform(function ($item) {
76
+        return collect($oceans)->transform(function($item) {
77 77
             $data['name'] = $item;
78 78
             $data['display_name'] = title_case($item);
79 79
             $data['also_called_as'] = ($item == 'antarctic') ? 'Southern Ocean' : null;
Please login to merge, or discard this patch.
src/Utils/UnionTerritories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     private function formatTerritories($territories)
75 75
     {
76
-        return collect($territories)->transform(function ($item, $key) {
76
+        return collect($territories)->transform(function($item, $key) {
77 77
             $data['name'] = $key;
78 78
             $data['display_name'] = str_replace('_', ' ', title_case($key));
79 79
             $data['capital'] = str_replace('_', ' ', title_case($item));
Please login to merge, or discard this patch.
src/WorldDataServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function register()
23 23
     {
24
-        $this->app->bind('bs-world', function () {
24
+        $this->app->bind('bs-world', function() {
25 25
             return new World(new DataRepository());
26 26
         });
27 27
     }
Please login to merge, or discard this patch.
src/Lib/ISOCodes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     private function filterRegions($regions, $region)
118 118
     {
119
-        return collect($regions)->filter(function ($item, $key) use ($region) {
119
+        return collect($regions)->filter(function($item, $key) use ($region) {
120 120
             return ($region == null) ? true : (strpos(strtolower($key), strtolower($region)) === 0) ? true : false;
121 121
         });
122 122
     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $iso_codes = $this->getOptimizedIsoData();
162 162
         $regions_data = $this->formatRegions($iso_codes);
163 163
         $regions = array_keys($regions_data);
164
-        return collect($regions)->map(function ($item) {
164
+        return collect($regions)->map(function($item) {
165 165
             return ['key' => strtolower($item), 'name' => $item];
166 166
         });
167 167
     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     {
178 178
         if ($key == null) return [];
179 179
         $iso_data = $this->getOptimizedIsoData();
180
-        return array_values(array_filter($iso_data, function ($item) use ($key) {
180
+        return array_values(array_filter($iso_data, function($item) use ($key) {
181 181
             return (str_contains(strtolower($item['name']), strtolower($key)) ||
182 182
                 str_contains(strtolower($item['alpha_2']), strtolower($key)) ||
183 183
                 str_contains(strtolower($item['alpha_3']), strtolower($key)) ||
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
      */
195 195
     private function filterIsoInfoByCountryName($iso_codes, $name)
196 196
     {
197
-        return collect($iso_codes)->map(function ($item, $key) {
197
+        return collect($iso_codes)->map(function($item, $key) {
198 198
             $item['display_name'] = $item['name'];
199 199
             $item['name'] = strtolower(studly_case($item['name']));
200 200
             return $item;
201
-        })->groupBy('name')->filter(function ($item, $key) use ($name) {
201
+        })->groupBy('name')->filter(function($item, $key) use ($name) {
202 202
             return strpos($key, $name) === 0;
203 203
         })->collapse();
204 204
     }
Please login to merge, or discard this patch.
src/Lib/Cities.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             return [];
175 175
         }
176 176
         $cities = $this->formatCitiesData();
177
-        return array_values(array_filter($cities, function ($item) use ($search_key) {
177
+        return array_values(array_filter($cities, function($item) use ($search_key) {
178 178
             return starts_with(strtolower($item['city']), strtolower($search_key));
179 179
         }));
180 180
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     public function statesForCities()
189 189
     {
190 190
         $states = $this->getOptimizedStatesData();
191
-        return array_map(function ($item) {
191
+        return array_map(function($item) {
192 192
             return $item['state_name'];
193 193
         }, $states);
194 194
     }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     public function countriesForCities()
203 203
     {
204 204
         $countries = $this->getOptimizedCountriesData();
205
-        return array_map(function ($item) {
205
+        return array_map(function($item) {
206 206
             return $item['country_name'];
207 207
         }, $countries);
208 208
     }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             return [];
220 220
         }
221 221
         $cities = $this->formatCitiesData();
222
-        return array_values(array_filter($cities, function ($item) use ($state_name) {
222
+        return array_values(array_filter($cities, function($item) use ($state_name) {
223 223
             return strtolower($item['state']) == strtolower($state_name);
224 224
         }));
225 225
     }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             return [];
237 237
         }
238 238
         $cities = $this->formatCitiesData();
239
-        return array_values(array_filter($cities, function ($item) use ($country_name) {
239
+        return array_values(array_filter($cities, function($item) use ($country_name) {
240 240
             return strtolower($item['country']) == strtolower($country_name);
241 241
         }));
242 242
     }
Please login to merge, or discard this patch.
src/Lib/States.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             return [];
154 154
         }
155 155
         $states = $this->formatStatesData();
156
-        return array_values(array_filter($states, function ($item) use ($search_key) {
156
+        return array_values(array_filter($states, function($item) use ($search_key) {
157 157
             return starts_with(strtolower($item['state']), strtolower($search_key));
158 158
         }));
159 159
     }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     public function countriesForStates()
167 167
     {
168 168
         $countries = $this->getOptimizedCountriesData();
169
-        return array_map(function ($item) {
169
+        return array_map(function($item) {
170 170
             return $item['country_name'];
171 171
         }, $countries);
172 172
     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             return [];
184 184
         }
185 185
         $states = $this->formatStatesData();
186
-        return array_values(array_filter($states, function ($item) use ($country_name) {
186
+        return array_values(array_filter($states, function($item) use ($country_name) {
187 187
             return strtolower($item['country']) == strtolower($country_name);
188 188
         }));
189 189
     }
Please login to merge, or discard this patch.
src/Lib/TimeZones.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     {
103 103
         if (!$search_key || ($search_key == '/')) return [];
104 104
         $timezones = $this->prepareTimezones();
105
-        $filtered_timezones = collect($timezones)->filter(function ($item) use ($search_key) {
105
+        $filtered_timezones = collect($timezones)->filter(function($item) use ($search_key) {
106 106
             return (strpos(strtolower($item['zone']), strtolower($search_key)) !== false);
107 107
         })->values();
108 108
         return $filtered_timezones;
Please login to merge, or discard this patch.