@@ -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 [MakeServiceServiceProvider::class]; |
|
| 22 | + return [ MakeServiceServiceProvider::class ]; |
|
| 23 | 23 | } |
| 24 | 24 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | use Symfony\Component\Console\Attribute\AsCommand; |
| 9 | 9 | use Symfony\Component\Console\Input\InputOption; |
| 10 | 10 | |
| 11 | -#[AsCommand(name: 'make:repository')] |
|
| 11 | +#[AsCommand(name: 'make:repository') ] |
|
| 12 | 12 | class MakeRepositoryCommand extends GeneratorCommand |
| 13 | 13 | { |
| 14 | 14 | /** |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | $model = $this->option('model'); |
| 55 | 55 | |
| 56 | 56 | if ($this->option('contract')) { |
| 57 | - $interface = $model . "RepositoryInterface"; |
|
| 58 | - $this->call('make:interface', ['name' => $interface, '--model' => $model]); |
|
| 57 | + $interface = $model."RepositoryInterface"; |
|
| 58 | + $this->call('make:interface', [ 'name' => $interface, '--model' => $model ]); |
|
| 59 | 59 | } else { |
| 60 | 60 | $interface = $this->option('interface'); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - if (! Str::startsWith($model, [ |
|
| 63 | + if (!Str::startsWith($model, [ |
|
| 64 | 64 | $this->laravel->getNamespace(), |
| 65 | 65 | 'Illuminate', |
| 66 | 66 | '\\', |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $model = $this->laravel->getNamespace().'Models\\'.str_replace('/', '\\', $model); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if (! Str::startsWith($interface, [ |
|
| 71 | + if (!Str::startsWith($interface, [ |
|
| 72 | 72 | $this->laravel->getNamespace(), |
| 73 | 73 | 'Illuminate', |
| 74 | 74 | '\\', |
@@ -77,19 +77,19 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $stub = str_replace( |
| 80 | - ['DummyModel', '{{ model }}'], class_basename($model), parent::buildClass($name) |
|
| 80 | + [ 'DummyModel', '{{ model }}' ], class_basename($model), parent::buildClass($name) |
|
| 81 | 81 | ); |
| 82 | 82 | |
| 83 | 83 | $stub = str_replace( |
| 84 | - ['DummyFullModel', '{{ modelNamespace }}'], trim($model, '\\'), $stub |
|
| 84 | + [ 'DummyFullModel', '{{ modelNamespace }}' ], trim($model, '\\'), $stub |
|
| 85 | 85 | ); |
| 86 | 86 | |
| 87 | 87 | $stub = str_replace( |
| 88 | - ['DummyInterface', '{{ interface }}'], class_basename($interface), $stub |
|
| 88 | + [ 'DummyInterface', '{{ interface }}' ], class_basename($interface), $stub |
|
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | 91 | return str_replace( |
| 92 | - ['DummyFullInterface', '{{ interfaceNamespace }}'], trim($interface, '\\'), $stub |
|
| 92 | + [ 'DummyFullInterface', '{{ interfaceNamespace }}' ], trim($interface, '\\'), $stub |
|
| 93 | 93 | ); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -147,10 +147,10 @@ discard block |
||
| 147 | 147 | protected function getOptions() |
| 148 | 148 | { |
| 149 | 149 | return [ |
| 150 | - ['contract', 'c', InputOption::VALUE_NONE, 'Create an interface class for this repository'], |
|
| 151 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the repository already exists'], |
|
| 152 | - ['interface', 'i', InputOption::VALUE_OPTIONAL, 'Create an interface namespace for this repository'], |
|
| 153 | - ['model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this repository'], |
|
| 150 | + [ 'contract', 'c', InputOption::VALUE_NONE, 'Create an interface class for this repository' ], |
|
| 151 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the repository already exists' ], |
|
| 152 | + [ 'interface', 'i', InputOption::VALUE_OPTIONAL, 'Create an interface namespace for this repository' ], |
|
| 153 | + [ 'model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this repository' ], |
|
| 154 | 154 | ]; |
| 155 | 155 | } |
| 156 | 156 | |
@@ -176,8 +176,8 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | $path = $this->getPath($name); |
| 178 | 178 | |
| 179 | - if ((! $this->hasOption('force') || |
|
| 180 | - ! $this->option('force')) && |
|
| 179 | + if ((!$this->hasOption('force') || |
|
| 180 | + !$this->option('force')) && |
|
| 181 | 181 | $this->alreadyExists($this->getNameInput())) { |
| 182 | 182 | $this->components->error($this->type.' already exists.'); |
| 183 | 183 | |
@@ -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: 'make:service')] |
|
| 10 | +#[AsCommand(name: 'make:service') ] |
|
| 11 | 11 | class MakeServiceCommand extends GeneratorCommand |
| 12 | 12 | { |
| 13 | 13 | /** |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | if ($this->option('extra')) { |
| 58 | - $this->call('make:request', ['name' => $request]); |
|
| 58 | + $this->call('make:request', [ 'name' => $request ]); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if (! Str::startsWith($request, [ |
|
| 61 | + if (!Str::startsWith($request, [ |
|
| 62 | 62 | $this->laravel->getNamespace(), |
| 63 | 63 | 'Illuminate', |
| 64 | 64 | '\\', |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $stub = str_replace( |
| 70 | - ['DummyRequest', '{{ request }}'], class_basename($request), parent::buildClass($name) |
|
| 70 | + [ 'DummyRequest', '{{ request }}' ], class_basename($request), parent::buildClass($name) |
|
| 71 | 71 | ); |
| 72 | 72 | |
| 73 | 73 | return str_replace( |
| 74 | - ['DummyFullRequest', '{{ requestNamespace }}'], trim($request, '\\'), $stub |
|
| 74 | + [ 'DummyFullRequest', '{{ requestNamespace }}' ], trim($request, '\\'), $stub |
|
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -133,9 +133,9 @@ discard block |
||
| 133 | 133 | protected function getOptions() |
| 134 | 134 | { |
| 135 | 135 | return [ |
| 136 | - ['extra', 'e', InputOption::VALUE_NONE, 'Create an form request class for this service'], |
|
| 137 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the service already exists'], |
|
| 138 | - ['request', 'r', InputOption::VALUE_OPTIONAL, 'Create a form request namespace class for this service'], |
|
| 136 | + [ 'extra', 'e', InputOption::VALUE_NONE, 'Create an form request class for this service' ], |
|
| 137 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the service already exists' ], |
|
| 138 | + [ 'request', 'r', InputOption::VALUE_OPTIONAL, 'Create a form request namespace class for this service' ], |
|
| 139 | 139 | ]; |
| 140 | 140 | } |
| 141 | 141 | } |
@@ -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: 'make:facade')] |
|
| 10 | +#[AsCommand(name: 'make:facade') ] |
|
| 11 | 11 | class MakeFacadeCommand extends GeneratorCommand |
| 12 | 12 | { |
| 13 | 13 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $accessor = explode('\\', strtolower($name)); |
| 55 | 55 | $accessor = array_pop($accessor); |
| 56 | 56 | |
| 57 | - if (! Str::startsWith($contract, [ |
|
| 57 | + if (!Str::startsWith($contract, [ |
|
| 58 | 58 | $this->laravel->getNamespace(), |
| 59 | 59 | 'Illuminate', |
| 60 | 60 | '\\', |
@@ -63,15 +63,15 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | $stub = str_replace( |
| 66 | - ['DummyContract', '{{ contract }}'], class_basename($contract), parent::buildClass($name) |
|
| 66 | + [ 'DummyContract', '{{ contract }}' ], class_basename($contract), parent::buildClass($name) |
|
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | 69 | $stub = str_replace( |
| 70 | - ['DummyFullAccessor', '{{ accessor }}'], $accessor, $stub |
|
| 70 | + [ 'DummyFullAccessor', '{{ accessor }}' ], $accessor, $stub |
|
| 71 | 71 | ); |
| 72 | 72 | |
| 73 | 73 | return str_replace( |
| 74 | - ['DummyFullContract', '{{ contractNamespace }}'], trim($contract, '\\'), $stub |
|
| 74 | + [ 'DummyFullContract', '{{ contractNamespace }}' ], trim($contract, '\\'), $stub |
|
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | protected function getOptions() |
| 134 | 134 | { |
| 135 | 135 | return [ |
| 136 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the facade already exists'], |
|
| 137 | - ['contract', 'c', InputOption::VALUE_OPTIONAL, 'Create a contract namespace for this facade'], |
|
| 136 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the facade already exists' ], |
|
| 137 | + [ 'contract', 'c', InputOption::VALUE_OPTIONAL, 'Create a contract namespace for this facade' ], |
|
| 138 | 138 | ]; |
| 139 | 139 | } |
| 140 | 140 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | use Symfony\Component\Console\Attribute\AsCommand; |
| 7 | 7 | use Symfony\Component\Console\Input\InputOption; |
| 8 | 8 | |
| 9 | -#[AsCommand(name: 'make:action')] |
|
| 9 | +#[AsCommand(name: 'make:action') ] |
|
| 10 | 10 | class MakeActionCommand extends GeneratorCommand |
| 11 | 11 | { |
| 12 | 12 | /** |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | protected function getOptions() |
| 96 | 96 | { |
| 97 | 97 | return [ |
| 98 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the action already exists'], |
|
| 98 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the action already exists' ], |
|
| 99 | 99 | ]; |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -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: 'make:traitclass')] |
|
| 10 | +#[AsCommand(name: 'make:traitclass') ] |
|
| 11 | 11 | class MakeTraitCommand extends GeneratorCommand |
| 12 | 12 | { |
| 13 | 13 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | protected function getOptions() |
| 97 | 97 | { |
| 98 | 98 | return [ |
| 99 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the trait already exists'], |
|
| 99 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the trait already exists' ], |
|
| 100 | 100 | ]; |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | use Symfony\Component\Console\Attribute\AsCommand; |
| 7 | 7 | use Symfony\Component\Console\Input\InputOption; |
| 8 | 8 | |
| 9 | -#[AsCommand(name: 'make:enumclass')] |
|
| 9 | +#[AsCommand(name: 'make:enumclass') ] |
|
| 10 | 10 | class MakeEnumCommand extends GeneratorCommand |
| 11 | 11 | { |
| 12 | 12 | /** |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | protected function getOptions() |
| 96 | 96 | { |
| 97 | 97 | return [ |
| 98 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the enum already exists'], |
|
| 98 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the enum already exists' ], |
|
| 99 | 99 | ]; |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -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: 'make:interfaceclass')] |
|
| 10 | +#[AsCommand(name: 'make:interfaceclass') ] |
|
| 11 | 11 | class MakeInterfaceCommand extends GeneratorCommand |
| 12 | 12 | { |
| 13 | 13 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $model = $this->option('model'); |
| 54 | 54 | |
| 55 | - if (! Str::startsWith($model, [ |
|
| 55 | + if (!Str::startsWith($model, [ |
|
| 56 | 56 | $this->laravel->getNamespace(), |
| 57 | 57 | 'Illuminate', |
| 58 | 58 | '\\', |
@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $stub = str_replace( |
| 64 | - ['DummyModel', '{{ model }}'], class_basename($model), parent::buildClass($name) |
|
| 64 | + [ 'DummyModel', '{{ model }}' ], class_basename($model), parent::buildClass($name) |
|
| 65 | 65 | ); |
| 66 | 66 | |
| 67 | 67 | return str_replace( |
| 68 | - ['DummyFullModel', '{{ modelNamespace }}'], trim($model, '\\'), $stub |
|
| 68 | + [ 'DummyFullModel', '{{ modelNamespace }}' ], trim($model, '\\'), $stub |
|
| 69 | 69 | ); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | protected function getOptions() |
| 128 | 128 | { |
| 129 | 129 | return [ |
| 130 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the interface already exists'], |
|
| 131 | - ['model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this interface'], |
|
| 130 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the interface already exists' ], |
|
| 131 | + [ 'model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this interface' ], |
|
| 132 | 132 | ]; |
| 133 | 133 | } |
| 134 | 134 | } |