Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — do-not-use-request-if-no-reque... ( 8e9c0b )
by Pedro
27s queued 15s
created
src/Console/Commands/BuildBackpackCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
         // make a list of all models
36 36
         $models = $this->getModels(base_path('app'));
37 37
 
38
-        if (! count($models)) {
38
+        if (!count($models)) {
39 39
             $this->errorBlock('No models found.');
40 40
 
41 41
             return false;
42 42
         }
43 43
 
44 44
         foreach ($models as $model) {
45
-            $this->call('backpack:crud', ['name' => $model, '--validation' => $this->option('validation')]);
45
+            $this->call('backpack:crud', [ 'name' => $model, '--validation' => $this->option('validation') ]);
46 46
             $this->line('  <fg=gray>----------</>');
47 47
         }
48 48
 
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
 
52 52
     private function getModels(string $path): array
53 53
     {
54
-        $out = [];
54
+        $out = [ ];
55 55
         $results = scandir($path);
56 56
 
57 57
         foreach ($results as $result) {
58 58
             $filepath = "$path/$result";
59 59
 
60 60
             // ignore `.` (dot) prefixed files
61
-            if ($result[0] === '.') {
61
+            if ($result[ 0 ] === '.') {
62 62
                 continue;
63 63
             }
64 64
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
             $result = $this->validateModelClass($class);
79 79
             if ($result) {
80
-                $out[] = $result;
80
+                $out[ ] = $result;
81 81
                 continue;
82 82
             }
83 83
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
             $result = $this->validateModelClass("$namespace\\$classname");
90 90
             if ($result) {
91
-                $out[] = $result;
91
+                $out[ ] = $result;
92 92
                 continue;
93 93
             }
94 94
         }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         try {
102 102
             $reflection = new \ReflectionClass($class);
103 103
 
104
-            if ($reflection->isSubclassOf(Model::class) && ! $reflection->isAbstract()) {
104
+            if ($reflection->isSubclassOf(Model::class) && !$reflection->isAbstract()) {
105 105
                 return Str::of($class)->afterLast('\\');
106 106
             }
107 107
         } catch (\Throwable$e) {
Please login to merge, or discard this patch.
src/Console/Commands/CrudFormOperationBackpackCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     {
46 46
         $name = str_replace($this->laravel->getNamespace(), '', $name);
47 47
 
48
-        return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'Operation.php';
48
+        return $this->laravel[ 'path' ].'/'.str_replace('\\', '/', $name).'Operation.php';
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
src/Console/Commands/Views/WidgetBackpackCommand.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
     {
59 59
         if ($this->sourceViewNamespace) {
60 60
             $themePath = Str::contains($this->sourceViewNamespace, '::') ?
61
-                            Str::before($this->sourceViewNamespace, '::') :
62
-                            Str::beforeLast($this->sourceViewNamespace, '.');
61
+                            Str::before($this->sourceViewNamespace, '::') : Str::beforeLast($this->sourceViewNamespace, '.');
63 62
 
64 63
             $themePath = Str::replace('.', '/', $themePath);
65 64
 
Please login to merge, or discard this patch.
src/Console/Commands/Views/PublishOrCreateViewBackpackCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
                 $this->sourceFile = realpath(substr($from, 1));
106 106
             }
107 107
 
108
-            if (! $this->sourceFile) {
108
+            if (!$this->sourceFile) {
109 109
                 $this->errorProgressBlock();
110 110
                 $this->note("$this->type '$from' does not exist!", 'red');
111 111
                 $this->newLine();
Please login to merge, or discard this patch.
src/Console/Commands/CrudBackpackCommand.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,19 +47,19 @@  discard block
 block discarded – undo
47 47
 
48 48
         // Validate validation option
49 49
         $validation = $this->handleValidationOption();
50
-        if (! $validation) {
50
+        if (!$validation) {
51 51
             return false;
52 52
         }
53 53
 
54 54
         // Create the CRUD Model and show output
55
-        $this->call('backpack:crud-model', ['name' => $name]);
55
+        $this->call('backpack:crud-model', [ 'name' => $name ]);
56 56
 
57 57
         // Create the CRUD Controller and show output
58
-        $this->call('backpack:crud-controller', ['name' => $name, '--validation' => $validation]);
58
+        $this->call('backpack:crud-controller', [ 'name' => $name, '--validation' => $validation ]);
59 59
 
60 60
         // Create the CRUD Request and show output
61 61
         if ($validation === 'request') {
62
-            $this->call('backpack:crud-request', ['name' => $name]);
62
+            $this->call('backpack:crud-request', [ 'name' => $name ]);
63 63
         }
64 64
 
65 65
         // Create the CRUD route
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         
83 83
         $url = Str::of(config('app.url'))
84 84
             ->finish('/')
85
-            ->when($routePrefix !== '', function ($string) use ($routePrefix) {
85
+            ->when($routePrefix !== '', function($string) use ($routePrefix) {
86 86
                 return $string->append($routePrefix)->finish('/');
87 87
             })
88 88
             ->append($nameKebab);
@@ -99,24 +99,24 @@  discard block
 block discarded – undo
99 99
      */
100 100
     private function handleValidationOption()
101 101
     {
102
-        $options = ['request', 'array', 'field'];
102
+        $options = [ 'request', 'array', 'field' ];
103 103
 
104 104
         // Validate validation option
105 105
         $validation = $this->option('validation');
106 106
 
107
-        if (! $validation) {
107
+        if (!$validation) {
108 108
             $validation = $this->askHint(
109 109
                 'How would you like to define your validation rules, for the Create and Update operations?', [
110 110
                     'More info at <fg=blue>https://backpackforlaravel.com/docs/5.x/crud-operation-create#validation</>',
111 111
                     'Valid options are <fg=blue>request</>, <fg=blue>array</> or <fg=blue>field</>',
112
-                ], $options[0]);
112
+                ], $options[ 0 ]);
113 113
 
114
-            if (! $this->option('no-interaction')) {
114
+            if (!$this->option('no-interaction')) {
115 115
                 $this->deleteLines(5);
116 116
             }
117 117
         }
118 118
 
119
-        if (! in_array($validation, $options)) {
119
+        if (!in_array($validation, $options)) {
120 120
             $this->errorBlock("The validation must be request, array or field. '$validation' is not valid.");
121 121
 
122 122
             return false;
Please login to merge, or discard this patch.
src/Console/Commands/CrudControllerBackpackCommand.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         // Next, We will check to see if the class already exists. If it does, we don't want
60 60
         // to create the class and overwrite the user's code. So, we will bail out so the
61 61
         // code is untouched. Otherwise, we will continue generating this class' files.
62
-        if ((! $this->hasOption('force') || ! $this->option('force')) && $this->alreadyExists($this->getNameInput())) {
62
+        if ((!$this->hasOption('force') || !$this->option('force')) && $this->alreadyExists($this->getNameInput())) {
63 63
             $this->closeProgressBlock('Already existed', 'yellow');
64 64
 
65 65
             return false;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $name = str_replace($this->laravel->getNamespace(), '', $name);
87 87
 
88
-        return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'CrudController.php';
88
+        return $this->laravel[ 'path' ].'/'.str_replace('\\', '/', $name).'CrudController.php';
89 89
     }
90 90
 
91 91
     /**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
     protected function getAttributes($model)
136 136
     {
137
-        $attributes = [];
137
+        $attributes = [ ];
138 138
         $model = new $model();
139 139
 
140 140
         // if fillable was defined, use that as the attributes
@@ -160,25 +160,25 @@  discard block
 block discarded – undo
160 160
         $class = Str::afterLast($name, '\\');
161 161
         $model = "App\\Models\\$class";
162 162
 
163
-        if (! class_exists($model)) {
163
+        if (!class_exists($model)) {
164 164
             return $this;
165 165
         }
166 166
 
167 167
         $attributes = $this->getAttributes($model);
168
-        $fields = array_diff($attributes, ['id', 'created_at', 'updated_at', 'deleted_at']);
169
-        $columns = array_diff($attributes, ['id']);
168
+        $fields = array_diff($attributes, [ 'id', 'created_at', 'updated_at', 'deleted_at' ]);
169
+        $columns = array_diff($attributes, [ 'id' ]);
170 170
         $glue = PHP_EOL.'        ';
171 171
 
172 172
         // create an array with the needed code for defining fields
173 173
         $fields = collect($fields)
174
-            ->map(function ($field) {
174
+            ->map(function($field) {
175 175
                 return "CRUD::field('$field');";
176 176
             })
177 177
             ->join($glue);
178 178
 
179 179
         // create an array with the needed code for defining columns
180 180
         $columns = collect($columns)
181
-            ->map(function ($column) {
181
+            ->map(function($column) {
182 182
                 return "CRUD::column('$column');";
183 183
             })
184 184
             ->join($glue);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     protected function replaceModel(&$stub, $name)
201 201
     {
202 202
         $class = str_replace($this->getNamespace($name).'\\', '', $name);
203
-        $stub = str_replace(['DummyClass', '{{ class }}', '{{class}}'], $this->buildClassName($name), $stub);
203
+        $stub = str_replace([ 'DummyClass', '{{ class }}', '{{class}}' ], $this->buildClassName($name), $stub);
204 204
 
205 205
         return $this;
206 206
     }
@@ -226,9 +226,9 @@  discard block
 block discarded – undo
226 226
             $stub = str_replace('        CRUD::setValidation(DummyClassRequest::class);'.PHP_EOL, '', $stub);
227 227
         }
228 228
 
229
-        if($validation !== 'request') {
229
+        if ($validation !== 'request') {
230 230
             $stub = str_replace('use App\Http\Requests\DummyModelClassRequest;', '', $stub);
231
-        }else{
231
+        } else {
232 232
             // add a new line after the use statement
233 233
             $stub = str_replace('use App\Http\Requests\DummyModelClassRequest;', "use App\Http\Requests\DummyModelClassRequest;\n", $stub);
234 234
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
228 228
 
229 229
         if($validation !== 'request') {
230 230
             $stub = str_replace('use App\Http\Requests\DummyModelClassRequest;', '', $stub);
231
-        }else{
231
+        } else{
232 232
             // add a new line after the use statement
233 233
             $stub = str_replace('use App\Http\Requests\DummyModelClassRequest;', "use App\Http\Requests\DummyModelClassRequest;\n", $stub);
234 234
         }
Please login to merge, or discard this patch.