@@ -192,7 +192,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | $defaultNamespace = $this->laravel->getNamespace().'Http\\Handlers'; |
| 95 | 95 | |
| 96 | - if (! is_null($namespaceOption = $this->getValidatedAndNormalizedNamespaceOption())) { |
|
| 96 | + if (!is_null($namespaceOption = $this->getValidatedAndNormalizedNamespaceOption())) { |
|
| 97 | 97 | if (starts_with($namespaceOption, '\\')) { |
| 98 | 98 | return $namespaceOption; |
| 99 | 99 | } |
@@ -114,13 +114,13 @@ discard block |
||
| 114 | 114 | { |
| 115 | 115 | $namespace = (string) $this->option('namespace'); |
| 116 | 116 | |
| 117 | - if (! $namespace) { |
|
| 117 | + if (!$namespace) { |
|
| 118 | 118 | return null; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | $namespaceWithNormalizedSlashes = preg_replace('/[\/\\\]+/', '\\', $namespace); |
| 122 | 122 | |
| 123 | - if (! preg_match('/^(\\\|(\\\?\w+)+)$/', $namespaceWithNormalizedSlashes)) { |
|
| 123 | + if (!preg_match('/^(\\\|(\\\?\w+)+)$/', $namespaceWithNormalizedSlashes)) { |
|
| 124 | 124 | throw new CommandException('['.$namespace.'] is not a valid namespace.'); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | if ($bag->isEmpty()) { |
| 142 | 142 | return [$name]; |
| 143 | 143 | } else { |
| 144 | - return array_map(function (string $action) use ($name) { |
|
| 144 | + return array_map(function(string $action) use ($name) { |
|
| 145 | 145 | return studly_case($action).$name; |
| 146 | 146 | }, $bag->get()); |
| 147 | 147 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | protected function getValidatedNameArgument(): string |
| 157 | 157 | { |
| 158 | 158 | $name = (string) $this->argument('name'); |
| 159 | - if (! preg_match('/^\w+$/', $name)) { |
|
| 159 | + if (!preg_match('/^\w+$/', $name)) { |
|
| 160 | 160 | throw new CommandException('Name can\'t contain any non-word characters.'); |
| 161 | 161 | } |
| 162 | 162 | |