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...b2548c )
by Cristian
50s queued 19s
created
src/Console/Commands/CrudControllerBackpackCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         // Next, We will check to see if the class already exists. If it does, we don't want
59 59
         // to create the class and overwrite the user's code. So, we will bail out so the
60 60
         // code is untouched. Otherwise, we will continue generating this class' files.
61
-        if ((! $this->hasOption('force') || ! $this->option('force')) && $this->alreadyExists($this->getNameInput())) {
61
+        if ((!$this->hasOption('force') || !$this->option('force')) && $this->alreadyExists($this->getNameInput())) {
62 62
             $this->closeProgressBlock('Already existed', 'yellow');
63 63
 
64 64
             return false;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $name = str_replace($this->laravel->getNamespace(), '', $name);
86 86
 
87
-        return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'CrudController.php';
87
+        return $this->laravel[ 'path' ].'/'.str_replace('\\', '/', $name).'CrudController.php';
88 88
     }
89 89
 
90 90
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
     protected function getAttributes($model)
135 135
     {
136
-        $attributes = [];
136
+        $attributes = [ ];
137 137
         $model = new $model();
138 138
 
139 139
         // if fillable was defined, use that as the attributes
@@ -159,25 +159,25 @@  discard block
 block discarded – undo
159 159
         $class = Str::afterLast($name, '\\');
160 160
         $model = "App\\Models\\$class";
161 161
 
162
-        if (! class_exists($model)) {
162
+        if (!class_exists($model)) {
163 163
             return $this;
164 164
         }
165 165
 
166 166
         $attributes = $this->getAttributes($model);
167
-        $fields = array_diff($attributes, ['id', 'created_at', 'updated_at', 'deleted_at']);
168
-        $columns = array_diff($attributes, ['id']);
167
+        $fields = array_diff($attributes, [ 'id', 'created_at', 'updated_at', 'deleted_at' ]);
168
+        $columns = array_diff($attributes, [ 'id' ]);
169 169
         $glue = PHP_EOL.'        ';
170 170
 
171 171
         // create an array with the needed code for defining fields
172 172
         $fields = collect($fields)
173
-            ->map(function ($field) {
173
+            ->map(function($field) {
174 174
                 return "CRUD::field('$field');";
175 175
             })
176 176
             ->join($glue);
177 177
 
178 178
         // create an array with the needed code for defining columns
179 179
         $columns = collect($columns)
180
-            ->map(function ($column) {
180
+            ->map(function($column) {
181 181
                 return "CRUD::column('$column');";
182 182
             })
183 183
             ->join($glue);
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     protected function replaceModel(&$stub, $name)
200 200
     {
201 201
         $class = str_replace($this->getNamespace($name).'\\', '', $name);
202
-        $stub = str_replace(['DummyClass', '{{ class }}', '{{class}}'], $this->buildClassName($name), $stub);
202
+        $stub = str_replace([ 'DummyClass', '{{ class }}', '{{class}}' ], $this->buildClassName($name), $stub);
203 203
 
204 204
         return $this;
205 205
     }
Please login to merge, or discard this patch.