GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 7bd6b0...c58cdc )
by Albert
05:49
created
src/DbExporter/DbMigrations.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -103,18 +103,18 @@  discard block
 block discarded – undo
103 103
 
104 104
             $tableIndexes = $this->getTableIndexes($value['table_name']);
105 105
             if (!is_null($tableIndexes) && count($tableIndexes)){
106
-            	foreach ($tableIndexes as $index) {
106
+                foreach ($tableIndexes as $index) {
107 107
                     if(Str::endsWith($index['Key_name'], '_index')) {
108
-                                    	   $up .= '                $' . "table->index('" . $index['Column_name'] . "');\n";
108
+                                            $up .= '                $' . "table->index('" . $index['Column_name'] . "');\n";
109 109
                     }
110 110
                     }
111
-            	}
111
+                }
112 112
 
113 113
             $up .= "            });\n\n";
114 114
             $Constraint = $ConstraintDown = "";
115 115
             /** 
116
-            * @var array $tableConstraints 
117
-            */
116
+             * @var array $tableConstraints 
117
+             */
118 118
             $tableConstraints = $this->getTableConstraints($value['table_name']);
119 119
             if (!is_null($tableConstraints) && count($tableConstraints)) {
120 120
             $Constraint = $ConstraintDown = "
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
 
144 144
     public function columnType($type)
145 145
     {
146
-       $columns = ['int'=> 'integer','smallint' => 'smallInteger','bigint' => 'bigInteger','char '=>'string', 'varchar' => 'string','float' => 'float','double' => 'double','decimal' => 'decimal','tinyint' => 'boolean','date' => 'date','timestamp' => 'timestamp','datetime' => 'dateTime','longtext' => 'longText','mediumtext' => 'mediumText','text' => 'text','longblob' => 'binary' ,'blob' => 'binary','enum' => 'enum'];
147
-       return array_key_exists($type, $columns) ? $columns[$type] : '';
146
+        $columns = ['int'=> 'integer','smallint' => 'smallInteger','bigint' => 'bigInteger','char '=>'string', 'varchar' => 'string','float' => 'float','double' => 'double','decimal' => 'decimal','tinyint' => 'boolean','date' => 'date','timestamp' => 'timestamp','datetime' => 'dateTime','longtext' => 'longText','mediumtext' => 'mediumText','text' => 'text','longblob' => 'binary' ,'blob' => 'binary','enum' => 'enum'];
147
+        return array_key_exists($type, $columns) ? $columns[$type] : '';
148 148
                         
149 149
                
150 150
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
                 $numbers = "";
86 86
                 $nullable = $values->Null == "NO" ? "" : "->nullable()";
87 87
                 $default = empty($values->Default) ? "" : "->default(\"{$values->Default}\")";
88
-                $default= $values->Default =='CURRENT_TIMESTAMP' ? '->useCurrent()':$default;
89
-                $unsigned = strpos($values->Type, "unsigned") === false ? '': '->unsigned()';
88
+                $default = $values->Default == 'CURRENT_TIMESTAMP' ? '->useCurrent()' : $default;
89
+                $unsigned = strpos($values->Type, "unsigned") === false ? '' : '->unsigned()';
90 90
 
91 91
                 if (in_array($type, ['var', 'varchar', 'enum', 'decimal', 'float'])) {
92 92
                     $para = strpos($values->Type, '(');
93 93
                     $opt = substr($values->Type, $para + 1, -1);
94
-                    $numbers = $type== 'enum' ? ', array(' . $opt . ')' : ",  " .$opt;
94
+                    $numbers = $type == 'enum' ? ', array(' . $opt . ')' : ",  " . $opt;
95 95
                 }
96 96
                 $method = $this->columnType($type);
97 97
                 if ($values->Key == 'PRI') {
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
             }
103 103
 
104 104
             $tableIndexes = $this->getTableIndexes($value['table_name']);
105
-            if (!is_null($tableIndexes) && count($tableIndexes)){
105
+            if (!is_null($tableIndexes) && count($tableIndexes)) {
106 106
             	foreach ($tableIndexes as $index) {
107
-                    if(Str::endsWith($index['Key_name'], '_index')) {
107
+                    if (Str::endsWith($index['Key_name'], '_index')) {
108 108
                                     	   $up .= '                $' . "table->index('" . $index['Column_name'] . "');\n";
109 109
                     }
110 110
                     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
     public function columnType($type)
145 145
     {
146
-       $columns = ['int'=> 'integer','smallint' => 'smallInteger','bigint' => 'bigInteger','char '=>'string', 'varchar' => 'string','float' => 'float','double' => 'double','decimal' => 'decimal','tinyint' => 'boolean','date' => 'date','timestamp' => 'timestamp','datetime' => 'dateTime','longtext' => 'longText','mediumtext' => 'mediumText','text' => 'text','longblob' => 'binary' ,'blob' => 'binary','enum' => 'enum'];
146
+       $columns = ['int'=> 'integer', 'smallint' => 'smallInteger', 'bigint' => 'bigInteger', 'char '=>'string', 'varchar' => 'string', 'float' => 'float', 'double' => 'double', 'decimal' => 'decimal', 'tinyint' => 'boolean', 'date' => 'date', 'timestamp' => 'timestamp', 'datetime' => 'dateTime', 'longtext' => 'longText', 'mediumtext' => 'mediumText', 'text' => 'text', 'longblob' => 'binary', 'blob' => 'binary', 'enum' => 'enum'];
147 147
        return array_key_exists($type, $columns) ? $columns[$type] : '';
148 148
                         
149 149
                
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 	     * Table: {$name}
174 174
 	     */
175 175
 	    {$values['up']}";
176
-                $upConstraint.="
176
+                $upConstraint .= "
177 177
                 {$values['constraint']}";
178
-                    $downConstraint.="
178
+                    $downConstraint .= "
179 179
                 {$values['constraint_down']}";
180 180
 
181 181
                 $downSchema .= "
Please login to merge, or discard this patch.
src/DbExporter/DbExporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     public function getTableIndexes($table)
55 55
     {
56 56
         $pdo = DB::connection()->getPdo();
57
-        return $pdo->query('SHOW INDEX FROM ' .$this->database.'.'. $table . ' WHERE Key_name != "PRIMARY"');
57
+        return $pdo->query('SHOW INDEX FROM ' . $this->database . '.' . $table . ' WHERE Key_name != "PRIMARY"');
58 58
     }
59 59
 
60 60
     /**
Please login to merge, or discard this patch.
src/DbExporter/Server.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -45,6 +45,9 @@
 block discarded – undo
45 45
         return scandir($localPath);
46 46
     }
47 47
 
48
+    /**
49
+     * @return string|null
50
+     */
48 51
     private function getDiskName()
49 52
     {
50 53
         // For now static from he config file.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,16 +31,16 @@
 block discarded – undo
31 31
 
32 32
             // Copy the files
33 33
             Storage::disk($this->getDiskName())->put(
34
-                $remotePath .'/'.$file,
34
+                $remotePath . '/' . $file,
35 35
                 $localPath . '/' . $file
36 36
             );
37 37
         }
38 38
 
39 39
         return true;
40 40
     }
41
-    public function files($what='')
41
+    public function files($what = '')
42 42
     {
43
-        $localPath = Config::get('db-exporter.export_path.'.$what);
43
+        $localPath = Config::get('db-exporter.export_path.' . $what);
44 44
 
45 45
         return scandir($localPath);
46 46
     }
Please login to merge, or discard this patch.
src/DbExporter/DbExportHandlerServiceProvider.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
     public function boot(DbMigrations $migrator)
27 27
     {
28 28
         $this->publishes([
29
-            realpath(__DIR__ .'/../').'/config/db-exporter.php' => config_path('db-exporter.php'),
29
+            realpath(__DIR__ . '/../') . '/config/db-exporter.php' => config_path('db-exporter.php'),
30 30
         ]);
31 31
 
32 32
         $this->mergeConfigFrom(
33
-            realpath(__DIR__ .'/../').'/config/db-exporter.php', 'db-exporter'
33
+            realpath(__DIR__ . '/../') . '/config/db-exporter.php', 'db-exporter'
34 34
         );
35 35
         // Instatiate a new DbMigrations class to send to the handler
36 36
         $this->migrator = $migrator;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         return new DbExportHandler($app[DbMigrations::class], $seeder);
109 109
         });
110 110
 
111
-        $this->app->bind('DbExporter', function($app){
111
+        $this->app->bind('DbExporter', function($app) {
112 112
             return $app[DbExportHandler::class];
113 113
         });
114 114
     }
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         );
42 42
         // Instatiate a new DbMigrations class to send to the handler
43 43
         $this->migrator = $migrator;
44
-         // Load the alias
44
+            // Load the alias
45 45
         $this->loadAlias();
46 46
        
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $this->app->register(DbMigrationsServiceProvider::class);
54 54
         // Register the base export handler class
55 55
         $this->registerDbExportHandler();
56
-         // Handle the artisan commands
56
+            // Handle the artisan commands
57 57
         $this->registerCommands();
58 58
     }
59 59
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         // when the Artisan application actually starts up and is getting used.
78 78
         $this->commands('db-exporter.migrations', 'db-exporter.seeds', 'db-exporter.backup');
79 79
                 
80
-     }
80
+        }
81 81
 
82 82
     /**
83 83
      * Register the migrations command
Please login to merge, or discard this patch.
src/DbExporter/DbMigrationsServiceProvider.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
     public function boot()
23 23
     {
24 24
 
25
-       $loader = AliasLoader::getInstance();
26
-       $loader->alias('DbMigrations', 'Facades\DbMigrations');
25
+        $loader = AliasLoader::getInstance();
26
+        $loader->alias('DbMigrations', 'Facades\DbMigrations');
27 27
 
28 28
 
29 29
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $this->app->singleton(DbMigrations::class, function()
40 40
         {
41 41
             $connType = Config::get('database.default');
42
-            $database = Config::get('database.connections.' .$connType );
42
+            $database = Config::get('database.connections.' . $connType);
43 43
             return new DbMigrations($database['database']);
44 44
         });
45 45
         
Please login to merge, or discard this patch.
src/DbExporter/Commands/CopyToRemoteCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
     private function upload($what)
88 88
     {
89
-        $localPath = Config::get('db-exporter.export_path.'.$what);
89
+        $localPath = Config::get('db-exporter.export_path.' . $what);
90 90
         $dir = scandir($localPath);
91 91
         $remotePath = Config::get('db-exporter.remote.' . $what);
92 92
         $this->line("\n");
Please login to merge, or discard this patch.