@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | use Symfony\Component\Console\Attribute\AsCommand; |
| 8 | 8 | use Symfony\Component\Console\Input\InputOption; |
| 9 | 9 | |
| 10 | -#[AsCommand(name: 'magic:readRequest')] |
|
| 10 | +#[AsCommand(name: 'magic:readRequest') ] |
|
| 11 | 11 | class MagicReadRequestCommand extends GeneratorCommand |
| 12 | 12 | { |
| 13 | 13 | /** |
@@ -56,15 +56,15 @@ discard block |
||
| 56 | 56 | $name = "{$name}ReadRequest"; |
| 57 | 57 | |
| 58 | 58 | $stub = str_replace( |
| 59 | - ['DummyModel', '{{ model }}'], class_basename($model), parent::buildClass($name) |
|
| 59 | + [ 'DummyModel', '{{ model }}' ], class_basename($model), parent::buildClass($name) |
|
| 60 | 60 | ); |
| 61 | 61 | |
| 62 | 62 | $stub = str_replace( |
| 63 | - ['DummyModelVariable', '{{ modelVariable }}'], trim($modelVariable, '\\'), $stub |
|
| 63 | + [ 'DummyModelVariable', '{{ modelVariable }}' ], trim($modelVariable, '\\'), $stub |
|
| 64 | 64 | ); |
| 65 | 65 | |
| 66 | 66 | return str_replace( |
| 67 | - ['DummyModelUnderScore', '{{ modelUnderScore }}'], trim($modelUnderScore, '\\'), $stub |
|
| 67 | + [ 'DummyModelUnderScore', '{{ modelUnderScore }}' ], trim($modelUnderScore, '\\'), $stub |
|
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | 70 | } |
@@ -123,9 +123,9 @@ discard block |
||
| 123 | 123 | protected function getOptions() |
| 124 | 124 | { |
| 125 | 125 | return [ |
| 126 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the request already exists'], |
|
| 127 | - ['variable', 'var', InputOption::VALUE_REQUIRED, 'Create a model variable value for this request class'], |
|
| 128 | - ['underscore', 'u', InputOption::VALUE_REQUIRED, 'Create a model underscore value for this request class'], |
|
| 126 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the request already exists' ], |
|
| 127 | + [ 'variable', 'var', InputOption::VALUE_REQUIRED, 'Create a model variable value for this request class' ], |
|
| 128 | + [ 'underscore', 'u', InputOption::VALUE_REQUIRED, 'Create a model underscore value for this request class' ], |
|
| 129 | 129 | ]; |
| 130 | 130 | } |
| 131 | 131 | |
@@ -140,6 +140,6 @@ discard block |
||
| 140 | 140 | $name = "{$name}ReadRequest"; |
| 141 | 141 | $name = Str::replaceFirst($this->rootNamespace(), '', $name); |
| 142 | 142 | |
| 143 | - return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php'; |
|
| 143 | + return $this->laravel[ 'path' ].'/'.str_replace('\\', '/', $name).'.php'; |
|
| 144 | 144 | } |
| 145 | 145 | } |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | use Symfony\Component\Console\Attribute\AsCommand; |
| 8 | 8 | use Symfony\Component\Console\Input\InputOption; |
| 9 | 9 | |
| 10 | -#[AsCommand(name: 'magic:test')] |
|
| 10 | +#[AsCommand(name: 'magic:test') ] |
|
| 11 | 11 | class MagicTestCommand extends GeneratorCommand |
| 12 | 12 | { |
| 13 | 13 | /** |
@@ -51,21 +51,21 @@ discard block |
||
| 51 | 51 | protected function buildClass($name) |
| 52 | 52 | { |
| 53 | 53 | $ary = explode("\\", $name); |
| 54 | - $model = $ary[count($ary) - 1]; |
|
| 54 | + $model = $ary[ count($ary) - 1 ]; |
|
| 55 | 55 | $modelVariable = $this->option('variable'); |
| 56 | 56 | $modelUnderScore = $this->option('underscore'); |
| 57 | 57 | $name = "{$name}Test"; |
| 58 | 58 | |
| 59 | 59 | $stub = str_replace( |
| 60 | - ['DummyModel', '{{ model }}'], class_basename($model), parent::buildClass($name) |
|
| 60 | + [ 'DummyModel', '{{ model }}' ], class_basename($model), parent::buildClass($name) |
|
| 61 | 61 | ); |
| 62 | 62 | |
| 63 | 63 | $stub = str_replace( |
| 64 | - ['DummyModelVariable', '{{ modelVariable }}'], trim($modelVariable, '\\'), $stub |
|
| 64 | + [ 'DummyModelVariable', '{{ modelVariable }}' ], trim($modelVariable, '\\'), $stub |
|
| 65 | 65 | ); |
| 66 | 66 | |
| 67 | 67 | return str_replace( |
| 68 | - ['DummyModelUnderScore', '{{ modelUnderScore }}'], trim($modelUnderScore, '\\'), $stub |
|
| 68 | + [ 'DummyModelUnderScore', '{{ modelUnderScore }}' ], trim($modelUnderScore, '\\'), $stub |
|
| 69 | 69 | ); |
| 70 | 70 | |
| 71 | 71 | } |
@@ -124,9 +124,9 @@ discard block |
||
| 124 | 124 | protected function getOptions() |
| 125 | 125 | { |
| 126 | 126 | return [ |
| 127 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the test already exists'], |
|
| 128 | - ['variable', 'var', InputOption::VALUE_REQUIRED, 'Create a model variable value for this test class'], |
|
| 129 | - ['underscore', 'u', InputOption::VALUE_REQUIRED, 'Create a model underscore value for this test class'], |
|
| 127 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the test already exists' ], |
|
| 128 | + [ 'variable', 'var', InputOption::VALUE_REQUIRED, 'Create a model variable value for this test class' ], |
|
| 129 | + [ 'underscore', 'u', InputOption::VALUE_REQUIRED, 'Create a model underscore value for this test class' ], |
|
| 130 | 130 | ]; |
| 131 | 131 | } |
| 132 | 132 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | protected function getPath($name) |
| 140 | 140 | { |
| 141 | 141 | $ary = explode("\\", $name); |
| 142 | - $name = $ary[count($ary) - 1]; |
|
| 142 | + $name = $ary[ count($ary) - 1 ]; |
|
| 143 | 143 | |
| 144 | 144 | return base_path("tests/Feature/{$name}Test.php"); |
| 145 | 145 | } |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | use Symfony\Component\Console\Attribute\AsCommand; |
| 8 | 8 | use Symfony\Component\Console\Input\InputOption; |
| 9 | 9 | |
| 10 | -#[AsCommand(name: 'magic:deleteRequest')] |
|
| 10 | +#[AsCommand(name: 'magic:deleteRequest') ] |
|
| 11 | 11 | class MagicDeleteRequestCommand extends GeneratorCommand |
| 12 | 12 | { |
| 13 | 13 | /** |
@@ -56,15 +56,15 @@ discard block |
||
| 56 | 56 | $name = "{$name}DeleteRequest"; |
| 57 | 57 | |
| 58 | 58 | $stub = str_replace( |
| 59 | - ['DummyModel', '{{ model }}'], class_basename($model), parent::buildClass($name) |
|
| 59 | + [ 'DummyModel', '{{ model }}' ], class_basename($model), parent::buildClass($name) |
|
| 60 | 60 | ); |
| 61 | 61 | |
| 62 | 62 | $stub = str_replace( |
| 63 | - ['DummyModelVariable', '{{ modelVariable }}'], trim($modelVariable, '\\'), $stub |
|
| 63 | + [ 'DummyModelVariable', '{{ modelVariable }}' ], trim($modelVariable, '\\'), $stub |
|
| 64 | 64 | ); |
| 65 | 65 | |
| 66 | 66 | return str_replace( |
| 67 | - ['DummyModelUnderScore', '{{ modelUnderScore }}'], trim($modelUnderScore, '\\'), $stub |
|
| 67 | + [ 'DummyModelUnderScore', '{{ modelUnderScore }}' ], trim($modelUnderScore, '\\'), $stub |
|
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | 70 | } |
@@ -123,9 +123,9 @@ discard block |
||
| 123 | 123 | protected function getOptions() |
| 124 | 124 | { |
| 125 | 125 | return [ |
| 126 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the request already exists'], |
|
| 127 | - ['variable', 'var', InputOption::VALUE_REQUIRED, 'Create a model variable value for this request class'], |
|
| 128 | - ['underscore', 'u', InputOption::VALUE_REQUIRED, 'Create a model underscore value for this request class'], |
|
| 126 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the request already exists' ], |
|
| 127 | + [ 'variable', 'var', InputOption::VALUE_REQUIRED, 'Create a model variable value for this request class' ], |
|
| 128 | + [ 'underscore', 'u', InputOption::VALUE_REQUIRED, 'Create a model underscore value for this request class' ], |
|
| 129 | 129 | ]; |
| 130 | 130 | } |
| 131 | 131 | |
@@ -140,6 +140,6 @@ discard block |
||
| 140 | 140 | $name = "{$name}DeleteRequest"; |
| 141 | 141 | $name = Str::replaceFirst($this->rootNamespace(), '', $name); |
| 142 | 142 | |
| 143 | - return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php'; |
|
| 143 | + return $this->laravel[ 'path' ].'/'.str_replace('\\', '/', $name).'.php'; |
|
| 144 | 144 | } |
| 145 | 145 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function setUp(): void |
| 11 | 11 | { |
| 12 | - parent::setUp(); |
|
| 12 | + parent::setUp(); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | protected function defineDatabaseMigrations() |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | |
| 20 | 20 | protected function getPackageProviders($app): array |
| 21 | 21 | { |
| 22 | - return [MagicmakeServiceProvider::class]; |
|
| 22 | + return [ MagicmakeServiceProvider::class ]; |
|
| 23 | 23 | } |
| 24 | 24 | } |