Passed
Push — master ( 80655a...9c661d )
by Denis
06:21
created
src/Generator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         foreach ($cities as $city) {
143 143
             if (!is_array($city)) {
144
-                $city = [$city];
144
+                $city = [ $city ];
145 145
             }
146 146
             foreach ($city as $item) {
147 147
                 $this->addCity($item);
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
     {
162 162
         $this->clearCities();
163 163
 
164
-        if (sizeof($cities) === 1 && is_array($cities[0])) {
165
-            $cities = $cities[0];
164
+        if (sizeof($cities) === 1 && is_array($cities[ 0 ])) {
165
+            $cities = $cities[ 0 ];
166 166
         }
167 167
 
168 168
         $this->addCities($cities);
@@ -231,17 +231,17 @@  discard block
 block discarded – undo
231 231
      */
232 232
     public function loadCustomData(int $cityId, $cityName, string $dataFile): Generator
233 233
     {
234
-        $cityNames = is_array($cityName) ? $cityName : [$cityName];
234
+        $cityNames = is_array($cityName) ? $cityName : [ $cityName ];
235 235
 
236
-        $data = [];
236
+        $data = [ ];
237 237
 
238
-        $data[$cityId] = $cityNames;
238
+        $data[ $cityId ] = $cityNames;
239 239
 
240 240
         $this->makeCities($data);
241 241
 
242 242
         $this->customDataFiles->put($cityId, $dataFile);
243 243
 
244
-        $this->addCity($cityNames[0]);
244
+        $this->addCity($cityNames[ 0 ]);
245 245
 
246 246
         return $this;
247 247
     }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     protected function makeCities($data)
335 335
     {
336 336
         foreach ($data as $key => $items) {
337
-            $this->availableCities->put($key, $items[0]);
337
+            $this->availableCities->put($key, $items[ 0 ]);
338 338
 
339 339
             foreach ($items as $item) {
340 340
                 $item = $this->prepare($item);
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      */
355 355
     protected function prepare($string): string
356 356
     {
357
-        $string = str_replace([' ', '-', '_'], '', mb_strtolower($string));
357
+        $string = str_replace([ ' ', '-', '_' ], '', mb_strtolower($string));
358 358
 
359 359
         return $string;
360 360
     }
Please login to merge, or discard this patch.