@@ -15,7 +15,7 @@ |
||
| 15 | 15 | $file = __DIR__.'/../../resources/csv/provinces.csv'; |
| 16 | 16 | $header = ['id', 'name', 'lat', 'long']; |
| 17 | 17 | $data = $csv->csv_to_array($file, $header); |
| 18 | - $provinces = array_map(function ($arr) use ($now) { |
|
| 18 | + $provinces = array_map(function($arr) use ($now) { |
|
| 19 | 19 | return [ |
| 20 | 20 | 'country_id' => 104, |
| 21 | 21 | 'name' => $arr['name'], |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | $file = __DIR__.'/../../resources/csv/districts.csv'; |
| 15 | 15 | $header = ['id', 'city_id', 'name', 'lat', 'long']; |
| 16 | 16 | $data = $csv->csv_to_array($file, $header); |
| 17 | - $districts = array_map(function ($arr) use ($now) { |
|
| 17 | + $districts = array_map(function($arr) use ($now) { |
|
| 18 | 18 | return [ |
| 19 | 19 | 'name' => $arr['name'], |
| 20 | 20 | 'city_id' => $arr['city_id'], |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $header = ['id', 'district_id', 'name', 'lat', 'long']; |
| 18 | 18 | $data = $csv->csv_to_array($file->getRealPath(), $header); |
| 19 | 19 | |
| 20 | - $villages = array_map(function ($arr) use ($now) { |
|
| 20 | + $villages = array_map(function($arr) use ($now) { |
|
| 21 | 21 | return [ |
| 22 | 22 | 'district_id' => $arr['district_id'], |
| 23 | 23 | 'name' => $arr['name'], |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function run() |
| 17 | 17 | { |
| 18 | - $colors = array_map(function ($color) { |
|
| 18 | + $colors = array_map(function($color) { |
|
| 19 | 19 | return [ |
| 20 | 20 | 'name' => $color['name'], |
| 21 | 21 | 'code' => $color['code'], |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $file = __DIR__.'/../../resources/countries.json'; |
| 19 | 19 | $data = json_decode(file_get_contents($file), true); |
| 20 | - $countries = array_map(function ($country) { |
|
| 20 | + $countries = array_map(function($country) { |
|
| 21 | 21 | return [ |
| 22 | 22 | 'capital' => $country['capital'] ?? null, |
| 23 | 23 | 'citizenship' => ((isset($country['citizenship'])) ? $country['citizenship'] : null), |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $file = __DIR__.'/../../resources/currencies.json'; |
| 20 | 20 | |
| 21 | 21 | $data = json_decode(file_get_contents($file), true); |
| 22 | - $currencies = array_map(function ($currency) { |
|
| 22 | + $currencies = array_map(function($currency) { |
|
| 23 | 23 | return [ |
| 24 | 24 | 'priority' => isset($currency['priority']) ? $currency['priority'] : 100, |
| 25 | 25 | 'iso_code' => isset($currency['iso_code']) ? $currency['iso_code'] : null, |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $this->info("Processing {$count} Province"); |
| 47 | 47 | $bar = $this->output->createProgressBar($count); |
| 48 | 48 | $bar->start(); |
| 49 | - Province::cursor()->each(function ($item) use ($bar) { |
|
| 49 | + Province::cursor()->each(function($item) use ($bar) { |
|
| 50 | 50 | $meta = $item->meta; |
| 51 | 51 | $geocoding = \Geocoder::getCoordinatesForAddress($item->address); |
| 52 | 52 | $meta['lat'] = $geocoding['lat'] ?? null; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $this->info("Processing {$count} City"); |
| 63 | 63 | $bar = $this->output->createProgressBar($count); |
| 64 | 64 | $bar->start(); |
| 65 | - City::with('provinsi')->cursor()->each(function ($item) use ($bar) { |
|
| 65 | + City::with('provinsi')->cursor()->each(function($item) use ($bar) { |
|
| 66 | 66 | $meta = $item->meta; |
| 67 | 67 | $geocoding = \Geocoder::getCoordinatesForAddress($item->address); |
| 68 | 68 | $meta['lat'] = $geocoding['lat'] ?? null; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $this->info("Processing {$count} District"); |
| 79 | 79 | $bar = $this->output->createProgressBar($count); |
| 80 | 80 | $bar->start(); |
| 81 | - District::with('kabupaten.provinsi')->cursor()->each(function ($item) use ($bar) { |
|
| 81 | + District::with('kabupaten.provinsi')->cursor()->each(function($item) use ($bar) { |
|
| 82 | 82 | $meta = $item->meta; |
| 83 | 83 | $geocoding = \Geocoder::getCoordinatesForAddress($item->address); |
| 84 | 84 | $meta['lat'] = $geocoding['lat'] ?? null; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $this->info("Processing {$count} Village"); |
| 95 | 95 | $bar = $this->output->createProgressBar($count); |
| 96 | 96 | $bar->start(); |
| 97 | - Village::whereNull('meta')->cursor()->each(function ($item) use ($bar) { |
|
| 97 | + Village::whereNull('meta')->cursor()->each(function($item) use ($bar) { |
|
| 98 | 98 | $meta = $item->meta; |
| 99 | 99 | if (!$meta) { |
| 100 | 100 | try { |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function register() |
| 13 | 13 | { |
| 14 | - $this->app->bind('master', function () { |
|
| 14 | + $this->app->bind('master', function() { |
|
| 15 | 15 | return new MasterService(); |
| 16 | 16 | }); |
| 17 | 17 | |