Passed
Pull Request — develop (#5)
by Ilya
05:14 queued 02:38
created
tests/HandlerMakeCommandTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     protected function getHandlerFileNamesByNameAndActions(string $name, array $actions): array
194 194
     {
195
-        return array_map(function (string $action) use ($name) {
195
+        return array_map(function(string $action) use ($name) {
196 196
             return studly_case($action).studly_case($name).'.php';
197 197
         }, $actions);
198 198
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     protected function getFileNamesByPath(string $path): array
207 207
     {
208
-        return array_map(function (SplFileInfo $file) {
208
+        return array_map(function(SplFileInfo $file) {
209 209
             return $file->getFilename();
210 210
         }, $this->files->files($path));
211 211
     }
Please login to merge, or discard this patch.
src/Commands/HandlerMakeCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $bag = new ActionsBag;
59 59
 
60
-        if (! $this->processResourceOption($bag) ||
61
-            ! $this->processActionsOption($bag) ||
62
-            ! $this->processExceptOption($bag) ||
63
-            ! $this->processApiOption($bag)) {
60
+        if (!$this->processResourceOption($bag) ||
61
+            !$this->processActionsOption($bag) ||
62
+            !$this->processExceptOption($bag) ||
63
+            !$this->processApiOption($bag)) {
64 64
             return false;
65 65
         }
66 66
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
         if (($namespaceOption = $this->getValidatedAndNormalizedNamespaceOption()) === false) {
97 97
             return false;
98
-        } elseif (! is_null($namespaceOption)) {
98
+        } elseif (!is_null($namespaceOption)) {
99 99
             if (starts_with($namespaceOption, '\\')) {
100 100
                 return $namespaceOption;
101 101
             }
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $namespace = (string) $this->option('namespace');
117 117
 
118
-        if (! $namespace) {
118
+        if (!$namespace) {
119 119
             return;
120 120
         }
121 121
 
122 122
         $namespaceWithNormalizedSlashes = preg_replace('/[\/\\\]+/', '\\', $namespace);
123 123
 
124
-        if (! preg_match('/^(\\\|(\\\?\w+)+)$/', $namespaceWithNormalizedSlashes)) {
124
+        if (!preg_match('/^(\\\|(\\\?\w+)+)$/', $namespaceWithNormalizedSlashes)) {
125 125
             $this->error('['.$namespace.'] is not a valid namespace.');
126 126
 
127 127
             return false;
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         if ($bag->isEmpty()) {
145 145
             return [$name];
146 146
         } else {
147
-            return array_map(function (string $action) use ($name) {
147
+            return array_map(function(string $action) use ($name) {
148 148
                 return studly_case($action).$name;
149 149
             }, $bag->get());
150 150
         }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     protected function getValidatedNameArgument()
159 159
     {
160 160
         $name = (string) $this->argument('name');
161
-        if (! preg_match('/^\w+$/', $name)) {
161
+        if (!preg_match('/^\w+$/', $name)) {
162 162
             $this->error('Name can\'t contain any non-word characters.');
163 163
 
164 164
             return false;
Please login to merge, or discard this patch.