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 ( b8d17d...fa6a42 )
by Albert
03:03
created
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
                 file_get_contents($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/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.
src/DbExporter/DbExportHandlerServiceProvider.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
     public function boot(DbMigrations $migrator)
34 34
     {
35 35
         $this->publishes([
36
-            realpath(__DIR__ .'/../').'/config/db-exporter.php' => config_path('db-exporter.php'),
36
+            realpath(__DIR__ . '/../') . '/config/db-exporter.php' => config_path('db-exporter.php'),
37 37
         ], 'config');
38 38
 
39 39
         $this->mergeConfigFrom(
40
-            realpath(__DIR__ .'/../').'/config/db-exporter.php', 'db-exporter'
40
+            realpath(__DIR__ . '/../') . '/config/db-exporter.php', 'db-exporter'
41 41
         );
42 42
         // Instatiate a new DbMigrations class to send to the handler
43 43
         $this->migrator = $migrator;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         return new DbExportHandler($app[DbMigrations::class], $seeder);
124 124
         });
125 125
 
126
-        $this->app->bind('DbExporter', function($app){
126
+        $this->app->bind('DbExporter', function($app) {
127 127
             return $app[DbExportHandler::class];
128 128
         });
129 129
     }
Please login to merge, or discard this patch.
src/config/db-exporter.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,21 +3,21 @@
 block discarded – undo
3 3
 return array(
4 4
     'backup' => array(
5 5
 
6
-       /**
7
-		* The disk where your files will be backed up
8
-    	**/
6
+        /**
7
+         * The disk where your files will be backed up
8
+         **/
9 9
         'disk' => 'local',
10 10
 
11 11
 
12 12
         /**
13
-		* Location on disk where to backup migratons
14
-    	**/
13
+         * Location on disk where to backup migratons
14
+         **/
15 15
         'migrations' => 'backup/migrations/',
16 16
 
17 17
 
18 18
         /**
19
-		* Location on disk where to backup seeds
20
-    	**/
19
+         * Location on disk where to backup seeds
20
+         **/
21 21
         'seeds' => 'backup/seeds/'
22 22
 
23 23
     ),
Please login to merge, or discard this patch.
src/DbExporter/DbExporter.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
         $del = DIRECTORY_SEPARATOR;
106 106
         $dir ='';
107 107
         $directories = explode($del, $path);
108
-         foreach ($directories as $key => $directory) { 
108
+            foreach ($directories as $key => $directory) { 
109 109
             if(!empty($directory))
110 110
                 $dir.= $del.$directory;
111 111
             if(!is_dir($dir))                                                                 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 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
     /**
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
     protected function makePath($path)
104 104
     {
105 105
         $del = DIRECTORY_SEPARATOR;
106
-        $dir ='';
106
+        $dir = '';
107 107
         $directories = explode($del, $path);
108 108
          foreach ($directories as $key => $directory) { 
109
-            if(!empty($directory))
110
-                $dir.= $del.$directory;
111
-            if(!is_dir($dir))                                                                 
109
+            if (!empty($directory))
110
+                $dir .= $del . $directory;
111
+            if (!is_dir($dir))                                                                 
112 112
                 @mkdir($dir);
113 113
             }   
114 114
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,10 +106,12 @@
 block discarded – undo
106 106
         $dir ='';
107 107
         $directories = explode($del, $path);
108 108
          foreach ($directories as $key => $directory) { 
109
-            if(!empty($directory))
110
-                $dir.= $del.$directory;
111
-            if(!is_dir($dir))                                                                 
112
-                @mkdir($dir);
109
+            if(!empty($directory)) {
110
+                            $dir.= $del.$directory;
111
+            }
112
+            if(!is_dir($dir)) {
113
+                            @mkdir($dir);
114
+            }
113 115
             }   
114 116
     }
115 117
 
Please login to merge, or discard this patch.
src/DbExporter/DbMigrations.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
 
131 131
             $tableIndexes = $this->getTableIndexes($value['table_name']);
132 132
             if (!is_null($tableIndexes) && count($tableIndexes)){
133
-            	foreach ($tableIndexes as $index) {
133
+                foreach ($tableIndexes as $index) {
134 134
                     if(Str::endsWith($index['Key_name'], '_index')) {
135
-                                    	   $up .= '                $' . "table->index('" . $index['Column_name'] . "');\n";
135
+                                            $up .= '                $' . "table->index('" . $index['Column_name'] . "');\n";
136 136
                     }
137 137
                     }
138
-            	}
138
+                }
139 139
 
140 140
             $up .= "            });\n\n";
141 141
             $Constraint = $ConstraintDown = "";
142 142
             /** 
143
-            * @var array $tableConstraints 
144
-            */
143
+             * @var array $tableConstraints 
144
+             */
145 145
             $tableConstraints = $this->getTableConstraints($value['table_name']);
146 146
             if (!is_null($tableConstraints) && count($tableConstraints)) {
147 147
             $Constraint = $ConstraintDown = "
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
     public function columnType($type)
172 172
     {
173
-       return array_key_exists($type, $columns) ? $this->columns[$type] : '';
173
+        return array_key_exists($type, $columns) ? $this->columns[$type] : '';
174 174
     }
175 175
     /**
176 176
      * Compile the migration into the base migration file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             'longtext'  => 'longText',
32 32
             'mediumtext'=> 'mediumText',
33 33
             'text'      => 'text',
34
-            'longblob'  => 'binary' ,
34
+            'longblob'  => 'binary',
35 35
             'blob'      => 'binary',
36 36
             'enum'      => 'enum'
37 37
         ];
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
                 $numbers = "";
113 113
                 $nullable = $values->Null == "NO" ? "" : "->nullable()";
114 114
                 $default = empty($values->Default) ? "" : "->default(\"{$values->Default}\")";
115
-                $default= $values->Default =='CURRENT_TIMESTAMP' ? '->useCurrent()':$default;
116
-                $unsigned = strpos($values->Type, "unsigned") === false ? '': '->unsigned()';
115
+                $default = $values->Default == 'CURRENT_TIMESTAMP' ? '->useCurrent()' : $default;
116
+                $unsigned = strpos($values->Type, "unsigned") === false ? '' : '->unsigned()';
117 117
 
118 118
                 if (in_array($type, ['var', 'varchar', 'enum', 'decimal', 'float'])) {
119 119
                     $para = strpos($values->Type, '(');
120 120
                     $opt = substr($values->Type, $para + 1, -1);
121
-                    $numbers = $type== 'enum' ? ', array(' . $opt . ')' : ",  " .$opt;
121
+                    $numbers = $type == 'enum' ? ', array(' . $opt . ')' : ",  " . $opt;
122 122
                 }
123 123
                 $method = $this->columnType($type);
124 124
                 if ($values->Key == 'PRI') {
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
             }
130 130
 
131 131
             $tableIndexes = $this->getTableIndexes($value['table_name']);
132
-            if (!is_null($tableIndexes) && count($tableIndexes)){
132
+            if (!is_null($tableIndexes) && count($tableIndexes)) {
133 133
             	foreach ($tableIndexes as $index) {
134
-                    if(Str::endsWith($index['Key_name'], '_index')) {
134
+                    if (Str::endsWith($index['Key_name'], '_index')) {
135 135
                                     	   $up .= '                $' . "table->index('" . $index['Column_name'] . "');\n";
136 136
                     }
137 137
                     }
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 	     * Table: {$name}
197 197
 	     */
198 198
 	    {$values['up']}";
199
-                $upConstraint.="
199
+                $upConstraint .= "
200 200
                 {$values['constraint']}";
201
-                    $downConstraint.="
201
+                    $downConstraint .= "
202 202
                 {$values['constraint_down']}";
203 203
 
204 204
                 $downSchema .= "
Please login to merge, or discard this patch.