Passed
Pull Request — master (#69)
by
unknown
16:23
created
database/migrations/panel_admins_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('panel_admins', function (Blueprint $table) {
16
+        Schema::create('panel_admins', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->foreignId('user_id')->constrained();
19 19
             $table->boolean('is_superuser');
Please login to merge, or discard this patch.
src/Parsers/StubParser.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
         $this->store = $store;
39 39
     }
40 40
 
41
-    public function setAuthType(bool $hasAuth){
41
+    public function setAuthType(bool $hasAuth) {
42 42
         $this->hasAuth = $hasAuth;
43 43
     }
44 44
 
45
-    public function setFields(array $fields){
45
+    public function setFields(array $fields) {
46 46
         $this->fields = $fields;
47 47
     }
48 48
 
49
-    public function setInputs(array $inputs){
49
+    public function setInputs(array $inputs) {
50 50
         $this->inputs = $inputs;
51 51
     }
52 52
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $fields = array_keys($this->inputs);
99 99
         $str = '';
100 100
 
101
-        if(in_array($this->inputName, $fields)){
101
+        if (in_array($this->inputName, $fields)) {
102 102
             $this->error("Model name must not equal to column names, fix it and rerun command with -f flag");
103 103
             die;
104 104
         }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $str = '';
119 119
         foreach ($this->inputs as $key => $input) {
120 120
             $inputObject = $this->normalizeInput($key, $input);
121
-            if (! $inputObject instanceof File){
121
+            if (!$inputObject instanceof File) {
122 122
                 continue;
123 123
             }
124 124
             // We get store path which has been defined in crud's config file
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
 
175 175
         foreach ($this->inputs as $key => $field) {
176 176
             $newLine = ($field != end($this->inputs) or $this->hasAuth);
177
-            $str .=  "'$key' => " . '$this' . "->$key,".$this->makeTab(3, $newLine);
177
+            $str .= "'$key' => ".'$this'."->$key,".$this->makeTab(3, $newLine);
178 178
         }
179 179
 
180
-        if($this->hasAuth){
180
+        if ($this->hasAuth) {
181 181
             $str .= "'user_id' => auth()->id(),";
182 182
         }
183 183
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     /**
188 188
      * Create Blade from stub
189 189
      */
190
-    public function parseBlade($stub){
190
+    public function parseBlade($stub) {
191 191
         $modelName = $this->getModelName($this->parsedModel);
192 192
 
193 193
         $crud = crud(strtolower($modelName));
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     /**
271 271
      * Tab Maker (Each tabs mean 4 space)
272 272
      */
273
-    public function makeTab($count, $newLine = true){
273
+    public function makeTab($count, $newLine = true) {
274 274
         $count = $count * 4;
275 275
         $tabs = str_repeat(' ', $count);
276 276
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
     public function normalizeField($field)
288 288
     {
289
-        if($field instanceof Field){
289
+        if ($field instanceof Field) {
290 290
             return $field;
291 291
         }
292 292
 
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
         return Field::title($title);
296 296
     }
297 297
 
298
-    public function normalizeInput($key, $input){
299
-        if ($input instanceof BaseInput){
298
+    public function normalizeInput($key, $input) {
299
+        if ($input instanceof BaseInput) {
300 300
             return $input;
301 301
         }
302 302
 
Please login to merge, or discard this patch.