Completed
Push — master ( 6605a5...2b20ca )
by Chubarov
08:45
created
src/Support/Local.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
 
20 20
     public function setLocal(string $local)
21 21
     {
22
-        if ( isset($this->mapLocal[$local]) )
22
+        if (isset($this->mapLocal[$local]))
23 23
         {
24 24
             config(['geography.locale' => $this->mapLocal[$local]]);
25
-        } else{
25
+        } else {
26 26
             throw new Exception('not locale');
27 27
         }
28 28
 
Please login to merge, or discard this patch.
src/database/migrations/CountryMigration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function execute()
11 11
     {
12
-        Capsule::schema()->create('country', function ($table) {
12
+        Capsule::schema()->create('country', function($table) {
13 13
             $table->increments('id');
14 14
             $table->string('title', 100);
15 15
             $table->string('code')->nullable()->comments('unique value');
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function check(callable $callback)
22 22
     {
23
-        if ( Capsule::schema()->hasTable('country') === false )
23
+        if (Capsule::schema()->hasTable('country') === false)
24 24
         {
25 25
             call_user_func($callback, $this);
26 26
         }
Please login to merge, or discard this patch.
src/database/seeds/CitiesTableSeeder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
     public function run()
26 26
     {
27 27
         ini_set('memory_limit', '256M');
28
-        Capsule::transaction(function ()  {
28
+        Capsule::transaction(function() {
29 29
             $response  = [];
30 30
             $offset    = 0;
31 31
             $arrCities = [];
32
-            $regions   =  Capsule::table(config('geography.nameTable.regions'))->get()->pluck('id', 'title')->toArray();
33
-            $country   =  Capsule::table(config('geography.nameTable.country'))->get();
32
+            $regions   = Capsule::table(config('geography.nameTable.regions'))->get()->pluck('id', 'title')->toArray();
33
+            $country   = Capsule::table(config('geography.nameTable.country'))->get();
34 34
 
35 35
             foreach ($country as $concreteCountry)
36 36
             {
37 37
                 do {
38
-                    $body          = file_get_contents(
38
+                    $body = file_get_contents(
39 39
                                     'https://api.vk.com/method/database.getCities?v=5.5&country_id='
40 40
                                     . $concreteCountry->id
41 41
                                     . '&need_all=1&count=1000&offset='
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
                             ];
54 54
                     }
55 55
 
56
-                    $response      = array_merge($response, $responseArray['response']['items']);
56
+                    $response = array_merge($response, $responseArray['response']['items']);
57 57
                     $offset += 1000;
58 58
 
59 59
                     Capsule::table('cities')->insert($arrCities);
60 60
                     $arrCities = [];
61
-                } while( ( count($responseArray['response']['items'])  > 0) );
61
+                } while ((count($responseArray['response']['items']) > 0));
62 62
             }
63 63
         });
64 64
     }
Please login to merge, or discard this patch.