@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | foreach ($cities as $city) { |
145 | 145 | if (!is_array($city)) { |
146 | - $city = [$city]; |
|
146 | + $city = [ $city ]; |
|
147 | 147 | } |
148 | 148 | foreach ($city as $item) { |
149 | 149 | $this->addCity($item); |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | |
166 | 166 | $this->clearCities(); |
167 | 167 | |
168 | - if (sizeof($cities) === 1 && is_array($cities[0])) { |
|
169 | - $cities = $cities[0]; |
|
168 | + if (sizeof($cities) === 1 && is_array($cities[ 0 ])) { |
|
169 | + $cities = $cities[ 0 ]; |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | $this->addCities($cities); |
@@ -235,17 +235,17 @@ discard block |
||
235 | 235 | */ |
236 | 236 | public function loadCustomData(int $cityId, $cityName, string $dataFile): Generator |
237 | 237 | { |
238 | - $cityNames = is_array($cityName) ? $cityName : [$cityName]; |
|
238 | + $cityNames = is_array($cityName) ? $cityName : [ $cityName ]; |
|
239 | 239 | |
240 | - $data = []; |
|
240 | + $data = [ ]; |
|
241 | 241 | |
242 | - $data[$cityId] = $cityNames; |
|
242 | + $data[ $cityId ] = $cityNames; |
|
243 | 243 | |
244 | 244 | $this->makeCities($data); |
245 | 245 | |
246 | 246 | $this->customDataFiles->put($cityId, $dataFile); |
247 | 247 | |
248 | - $this->addCity($cityNames[0]); |
|
248 | + $this->addCity($cityNames[ 0 ]); |
|
249 | 249 | |
250 | 250 | return $this; |
251 | 251 | } |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | protected function loadData(int $cityId): array |
302 | 302 | { |
303 | 303 | $file = $this->customDataFiles->has($cityId) |
304 | - ? storage_path($this->customDataFiles->get($cityId) ) |
|
304 | + ? storage_path($this->customDataFiles->get($cityId)) |
|
305 | 305 | :__DIR__ . '/data/ru/' . $cityId . '.php'; |
306 | 306 | |
307 | 307 | if (!file_exists($file)) { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | protected function makeCities($data) |
339 | 339 | { |
340 | 340 | foreach ($data as $key => $items) { |
341 | - $this->availableCities->put($key, $items[0]); |
|
341 | + $this->availableCities->put($key, $items[ 0 ]); |
|
342 | 342 | |
343 | 343 | foreach ($items as $item) { |
344 | 344 | $item = $this->prepare($item); |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | */ |
359 | 359 | protected function prepare($string): string |
360 | 360 | { |
361 | - $string = str_replace([' ', '-', '_'], '', mb_strtolower($string)); |
|
361 | + $string = str_replace([ ' ', '-', '_' ], '', mb_strtolower($string)); |
|
362 | 362 | |
363 | 363 | return $string; |
364 | 364 | } |