Passed
Push — master ( 965fb6...8a373e )
by Arthur
21:36
created
src/Foundation/Generator/Commands/TestMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
     protected function setOptions(): array
86 86
     {
87 87
         return [
88
-            ['type', $this->types, InputOption::VALUE_OPTIONAL, 'Indicates the type of the test.', $this->types[0]]
88
+            [ 'type', $this->types, InputOption::VALUE_OPTIONAL, 'Indicates the type of the test.', $this->types[ 0 ] ]
89 89
         ];
90 90
     }
91 91
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/MigrationMakeCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     protected function getTableName(): string
60 60
     {
61
-        return once(function () {
61
+        return once(function() {
62 62
             return $this->option('table') ?? $this->ask('What is the name of the table/collection?', strtolower(Str::plural($this->getModuleName())));
63 63
         });
64 64
     }
@@ -71,17 +71,17 @@  discard block
 block discarded – undo
71 71
     protected function setOptions() :array
72 72
     {
73 73
         return [
74
-            ['mongo', null, InputOption::VALUE_OPTIONAL, 'Mongo migration.', null],
75
-            ['table', null, InputOption::VALUE_OPTIONAL, 'Name of the table/collection.', null],
74
+            [ 'mongo', null, InputOption::VALUE_OPTIONAL, 'Mongo migration.', null ],
75
+            [ 'table', null, InputOption::VALUE_OPTIONAL, 'Name of the table/collection.', null ],
76 76
         ];
77 77
     }
78 78
 
79 79
     protected function isMongoMigration(): bool
80 80
     {
81
-        return once(function () {
81
+        return once(function() {
82 82
             $option = $this->option('mongo');
83 83
             if ($option !== null)
84
-                $option = (bool)$option;
84
+                $option = (bool) $option;
85 85
 
86 86
             return $option === null ? $this->confirm('Is this migration for a mongodb database?', false) : $option;
87 87
         });
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     protected function getDestinationFilePath() :string
106 106
     {
107
-        return $this->getModule()->getPath() . $this->filePath . '/' . $this->getDestinationFileName() . '.php';
107
+        return $this->getModule()->getPath().$this->filePath.'/'.$this->getDestinationFileName().'.php';
108 108
     }
109 109
 
110 110
     /**
@@ -112,6 +112,6 @@  discard block
 block discarded – undo
112 112
      */
113 113
     private function getDestinationFileName()
114 114
     {
115
-        return date('Y_m_d_His_') . split_caps_to_underscore($this->getClassName());
115
+        return date('Y_m_d_His_').split_caps_to_underscore($this->getClassName());
116 116
     }
117 117
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/CommandMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     protected function setOptions(): array
69 69
     {
70 70
         return [
71
-            ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', null],
71
+            [ 'command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', null ],
72 72
         ];
73 73
     }
74 74
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         return $this->getOption('command');
81 81
     }
82 82
 
83
-    protected function handleCommandOption($shortcut, $type, $question, $default){
84
-        return $this->ask('What is the name of the terminal command?',str_replace('command', '', strtolower($this->getModuleName()) . ':' . strtolower($this->getClassName())));
83
+    protected function handleCommandOption($shortcut, $type, $question, $default) {
84
+        return $this->ask('What is the name of the terminal command?', str_replace('command', '', strtolower($this->getModuleName()).':'.strtolower($this->getClassName())));
85 85
     }
86 86
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Support/Stub.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function getPath()
19 19
     {
20
-        return get_foundation_path() . '/Generator/Stubs/' . $this->path;
20
+        return get_foundation_path().'/Generator/Stubs/'.$this->path;
21 21
     }
22 22
 
23 23
     public function getName()
Please login to merge, or discard this patch.
src/Foundation/Generator/Abstracts/FileGeneratorCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     protected function setArguments(): array
28 28
     {
29
-        return [];
29
+        return [ ];
30 30
     }
31 31
 
32 32
     /**
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected function setOptions() :array
38 38
     {
39
-        return [];
39
+        return [ ];
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/RouteMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 
76 76
     protected function getFileName() :string
77 77
     {
78
-        return strtolower(Str::plural($this->getModuleName())).'.'.$this->getVersion() . '.php';
78
+        return strtolower(Str::plural($this->getModuleName())).'.'.$this->getVersion().'.php';
79 79
     }
80 80
 
81 81
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/ModelMakeCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
     protected function setOptions(): array
66 66
     {
67 67
         return [
68
-            ['mongo', null, InputOption::VALUE_OPTIONAL, 'Mongo model.', false],
69
-            ['migration', null, InputOption::VALUE_OPTIONAL, 'Create migration for the model.', true],
68
+            [ 'mongo', null, InputOption::VALUE_OPTIONAL, 'Mongo model.', false ],
69
+            [ 'migration', null, InputOption::VALUE_OPTIONAL, 'Create migration for the model.', true ],
70 70
         ];
71 71
     }
72 72
 
73
-    protected function handleMongoOption($shortcut, $type, $question, $default){
73
+    protected function handleMongoOption($shortcut, $type, $question, $default) {
74 74
         return $this->confirm('Is this model for a mongodb database?', $default);
75 75
     }
76 76
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         return $this->getOption('mongo');
80 80
     }
81 81
 
82
-    protected function handleMigrationOption($shortcut, $type, $question, $default){
82
+    protected function handleMigrationOption($shortcut, $type, $question, $default) {
83 83
         return $this->confirm('Do you want to create a migration for this model?', $default);
84 84
     }
85 85
 
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
         if ($this->needsMigration()) {
94 94
             if ($this->isMongoModel()) {
95 95
                 GeneratorManager::module($this->getModuleName(), $this->isOverwriteable())->createMigration(
96
-                    "Create" . ucfirst($this->getClassName()) . "Collection",
96
+                    "Create".ucfirst($this->getClassName())."Collection",
97 97
                     strtolower(split_caps_to_underscore(Str::plural($this->getClassName()))),
98 98
                     true);
99 99
             } else {
100 100
                 GeneratorManager::module($this->getModuleName(), $this->isOverwriteable())->createMigration(
101
-                    "Create" . ucfirst($this->getClassName() . "Table"),
101
+                    "Create".ucfirst($this->getClassName()."Table"),
102 102
                     strtolower(split_caps_to_underscore(Str::plural($this->getClassName()))),
103 103
                     false);
104 104
             }
Please login to merge, or discard this patch.
src/Foundation/Generator/Events/ModelGeneratedEvent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
  */
19 19
 class ModelGeneratedEvent extends ResourceGeneratedEvent
20 20
 {
21
-    public function isMongoModel(){
22
-        return $this->getStub()->getOptions()['MONGO'];
21
+    public function isMongoModel() {
22
+        return $this->getStub()->getOptions()[ 'MONGO' ];
23 23
     }
24 24
 
25
-    public function includesMigration(){
26
-        return $this->getStub()->getOptions()['MIGRATION'];
25
+    public function includesMigration() {
26
+        return $this->getStub()->getOptions()[ 'MIGRATION' ];
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Abstracts/ClassGeneratorCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
     protected function setArguments() :array
28 28
     {
29 29
         return [
30
-            ['name', InputArgument::OPTIONAL, 'The name of the ' . $this->getGeneratorName() . '.']
30
+            [ 'name', InputArgument::OPTIONAL, 'The name of the '.$this->getGeneratorName().'.' ]
31 31
         ];
32 32
     }
33 33
 
34 34
     protected function handleNameArgument()
35 35
     {
36
-        return $this->ask('Specify the name of the ' . $this->getGeneratorName() . '.');
36
+        return $this->ask('Specify the name of the '.$this->getGeneratorName().'.');
37 37
     }
38 38
 
39 39
     /**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     protected function getFileName() :string
43 43
     {
44
-        return $this->getClassName() . '.php';
44
+        return $this->getClassName().'.php';
45 45
     }
46 46
 
47 47
     /**
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function getClassNamespace(): string
54 54
     {
55
-        return $this->getModule()->getNamespace() . str_replace('/', '\\', $this->filePath);
55
+        return $this->getModule()->getNamespace().str_replace('/', '\\', $this->filePath);
56 56
     }
57 57
 
58
-    protected function getClassName(){
58
+    protected function getClassName() {
59 59
         $className = $this->getArgument('name');
60
-        if($className===null){
60
+        if ($className === null) {
61 61
             $this->error('class name not specified');
62
-            throw new \Exception('Name of ' . $this->getGeneratorName() . ' not set.');
62
+            throw new \Exception('Name of '.$this->getGeneratorName().' not set.');
63 63
         }
64 64
         return $className;
65 65
     }
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
      */
72 72
     protected function setOptions() :array
73 73
     {
74
-        return [];
74
+        return [ ];
75 75
     }
76 76
 }
Please login to merge, or discard this patch.