Passed
Push — master ( 3b0c08...8f68e9 )
by R.Kukuh
01:50
created
src/Console/Commands/EntityMake.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
     protected $pluralizedEntity;
18 18
     protected $requestStoreName;
19 19
     protected $requestUpdateName;
20
-    protected $additionalSteps  = [];
21
-    protected $tableContents    = [];
22
-    protected $tableHeaders     = ['Artefact', 'Filename and/or Location'];
20
+    protected $additionalSteps  = [ ];
21
+    protected $tableContents    = [ ];
22
+    protected $tableHeaders     = [ 'Artefact', 'Filename and/or Location' ];
23 23
 
24 24
     /**
25 25
      * The name and signature of the console command.
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
         $this->addToTable('Model', $this->modelNamespace.'/'.$this->modelName);
192 192
 
193
-        $this->info($this->data['artefact'].' created.');
193
+        $this->info($this->data[ 'artefact' ].' created.');
194 194
     }
195 195
 
196 196
     /**
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
         $path = app_path(config('entity.model.custom_base_directory'));
204 204
         $file = $path.'/'.config('entity.model.custom_base_name').'.php';
205 205
 
206
-        if (! $this->files->exists($file)) {
206
+        if (!$this->files->exists($file)) {
207 207
             $stub = $this->files->get(__DIR__.'/stubs/model.base.custom.stub');
208 208
 
209 209
             $classNamepace = 'App';
210 210
 
211
-            if (! empty(config('entity.model.custom_base_directory'))) {
211
+            if (!empty(config('entity.model.custom_base_directory'))) {
212 212
                 $classNamepace .= '\\'.config('entity.model.custom_base_directory');
213 213
             }
214 214
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
         $customBaseModelNamepace = '';
253 253
 
254
-        if (! empty(config('entity.model.custom_base_directory'))) {
254
+        if (!empty(config('entity.model.custom_base_directory'))) {
255 255
             $customBaseModelNamepace = config('entity.model.custom_base_directory').'\\';
256 256
         }
257 257
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
             $this->addToTable('Migration', $migration.'.php');
290 290
 
291
-            $this->info($this->data['artefact'].' created.');
291
+            $this->info($this->data[ 'artefact' ].' created.');
292 292
         }
293 293
     }
294 294
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
             }
459 459
 
460 460
             if ($this->option('request')) {
461
-                $this->info($this->data['artefact'].' created.');
461
+                $this->info($this->data[ 'artefact' ].' created.');
462 462
             }
463 463
         }
464 464
     }
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
             }
549 549
 
550 550
             if ($this->option('controller')) {
551
-                $this->info($this->data['artefact'].' created.');
551
+                $this->info($this->data[ 'artefact' ].' created.');
552 552
             }
553 553
         }
554 554
     }
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 
614 614
             $this->addToTable('Factory', $factory.'.php');
615 615
 
616
-            $this->info($this->data['artefact'].' created.');
616
+            $this->info($this->data[ 'artefact' ].' created.');
617 617
         }
618 618
     }
619 619
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 
662 662
             $this->addToTable('Policy', $policy.'.php');
663 663
 
664
-            $this->info($this->data['artefact'].' created.');
664
+            $this->info($this->data[ 'artefact' ].' created.');
665 665
 
666 666
             array_push($this->additionalSteps, 'Register the Policy');
667 667
         }
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 
695 695
                 $this->addToTable('Table Seeder', $seederTable);
696 696
 
697
-                $this->info($this->data['artefact'].' created.');
697
+                $this->info($this->data[ 'artefact' ].' created.');
698 698
 
699 699
                 array_push($this->additionalSteps, 'Call the Table Seeder in DatabaseSeeder');
700 700
             }
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
 
722 722
                     $this->addToTable('Dummy Seeder', config('entity.dummy.dummies').$seederDummy);
723 723
 
724
-                    $this->info($this->data['artefact'].' created.');
724
+                    $this->info($this->data[ 'artefact' ].' created.');
725 725
 
726 726
                     array_push($this->additionalSteps, 'Call the Dummy seeder in DummyDataSeeder');
727 727
                 }
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
      */
759 759
     protected function makeDummyDataSeeder()
760 760
     {
761
-        if (! $this->files->exists(
761
+        if (!$this->files->exists(
762 762
             $path = database_path('seeds/DummyDataSeeder.php')
763 763
         )) {
764 764
             $stub = $this->files->get(__DIR__.'/stubs/dataseeder.dummy.stub');
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 
795 795
                 $this->addToTable('Test: Feature', 'Feature/'.$test.'.php');
796 796
 
797
-                $this->info($this->data['artefact'].' created.');
797
+                $this->info($this->data[ 'artefact' ].' created.');
798 798
             }
799 799
 
800 800
             /** Unit test */
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 
815 815
                 $this->addToTable('Test: Unit', 'Unit/'.$test.'.php');
816 816
 
817
-                $this->info($this->data['artefact'].' created.');
817
+                $this->info($this->data[ 'artefact' ].' created.');
818 818
             }
819 819
         }
820 820
     }
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
      */
828 828
     protected function makeDirectory($path)
829 829
     {
830
-        if (! $this->files->isDirectory(dirname($path))) {
830
+        if (!$this->files->isDirectory(dirname($path))) {
831 831
             $this->files->makeDirectory(dirname($path), 0777, true, true);
832 832
         }
833 833
     }
@@ -892,8 +892,8 @@  discard block
 block discarded – undo
892 892
      */
893 893
     protected function addToTable($artefact, $location)
894 894
     {
895
-        $this->data['artefact'] = $artefact;
896
-        $this->data['location'] = $location;
895
+        $this->data[ 'artefact' ] = $artefact;
896
+        $this->data[ 'location' ] = $location;
897 897
 
898 898
         array_push($this->tableContents, $this->data);
899 899
     }
Please login to merge, or discard this patch.
src/LaravelEntityServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function boot()
16 16
     {
17 17
         if ($this->app->runningInConsole()) {
18
-            $this->commands([EntityMake::class]);
18
+            $this->commands([ EntityMake::class ]);
19 19
         }
20 20
 
21 21
         $this->publishes([
Please login to merge, or discard this patch.
config/entity.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
          * The entity's model namespace.
24 24
          *
25 25
          */
26
-        'namespace' => 'Modelmu',    // output: namespace App\Models;
26
+        'namespace' => 'Modelmu', // output: namespace App\Models;
27 27
 
28 28
         /**
29 29
          * Set a base model for your entity
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * It purpose is to make a dummy (obviously) data
46 46
      */
47 47
     'dummy' => [
48
-        'should_create' => true,          // Whether the dummy seeds has to be created
49
-        'directory'     => 'dummies',     // /database/seeds/dummies
48
+        'should_create' => true, // Whether the dummy seeds has to be created
49
+        'directory'     => 'dummies', // /database/seeds/dummies
50 50
     ],
51 51
 ];
Please login to merge, or discard this patch.