| @@ -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 | } | 
| @@ -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 | |
| @@ -131,9 +131,9 @@ discard block | ||
| 131 | 131 | protected function getOptions() | 
| 132 | 132 |      { | 
| 133 | 133 | return [ | 
| 134 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the interface already exists'], | |
| 135 | - ['model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this interface'], | |
| 136 | - ['user', 'u', InputOption::VALUE_NONE, 'Create extra fetch by user id functions for this repository'], | |
| 134 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the interface already exists' ], | |
| 135 | + [ 'model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this interface' ], | |
| 136 | + [ 'user', 'u', InputOption::VALUE_NONE, 'Create extra fetch by user id functions for this repository' ], | |
| 137 | 137 | ]; | 
| 138 | 138 | } | 
| 139 | 139 | } | 
| @@ -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,18 +54,18 @@ discard block | ||
| 54 | 54 |          $model = $this->option('model'); | 
| 55 | 55 | |
| 56 | 56 |          if ($this->option('contract')) { | 
| 57 | - $interface = $model . "RepositoryInterface"; | |
| 57 | + $interface = $model."RepositoryInterface"; | |
| 58 | 58 | |
| 59 | 59 |              if ($this->option('user')) { | 
| 60 | -                $this->call('make:interfaceclass', ['name' => $interface, '--model' => $model, '--user' => null]); | |
| 60 | +                $this->call('make:interfaceclass', [ 'name' => $interface, '--model' => $model, '--user' => null ]); | |
| 61 | 61 |              } else { | 
| 62 | -                $this->call('make:interfaceclass', ['name' => $interface, '--model' => $model]); | |
| 62 | +                $this->call('make:interfaceclass', [ 'name' => $interface, '--model' => $model ]); | |
| 63 | 63 | } | 
| 64 | 64 |          } else { | 
| 65 | 65 |              $interface = $this->option('interface'); | 
| 66 | 66 | } | 
| 67 | 67 | |
| 68 | - if (! Str::startsWith($model, [ | |
| 68 | + if (!Str::startsWith($model, [ | |
| 69 | 69 | $this->laravel->getNamespace(), | 
| 70 | 70 | 'Illuminate', | 
| 71 | 71 | '\\', | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 |              $model = $this->laravel->getNamespace().'Models\\'.str_replace('/', '\\', $model); | 
| 74 | 74 | } | 
| 75 | 75 | |
| 76 | - if (! Str::startsWith($interface, [ | |
| 76 | + if (!Str::startsWith($interface, [ | |
| 77 | 77 | $this->laravel->getNamespace(), | 
| 78 | 78 | 'Illuminate', | 
| 79 | 79 | '\\', | 
| @@ -82,19 +82,19 @@ discard block | ||
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 | $stub = str_replace( | 
| 85 | -            ['DummyModel', '{{ model }}'], class_basename($model), parent::buildClass($name) | |
| 85 | +            [ 'DummyModel', '{{ model }}' ], class_basename($model), parent::buildClass($name) | |
| 86 | 86 | ); | 
| 87 | 87 | |
| 88 | 88 | $stub = str_replace( | 
| 89 | -            ['DummyFullModel', '{{ modelNamespace }}'], trim($model, '\\'), $stub | |
| 89 | +            [ 'DummyFullModel', '{{ modelNamespace }}' ], trim($model, '\\'), $stub | |
| 90 | 90 | ); | 
| 91 | 91 | |
| 92 | 92 | $stub = str_replace( | 
| 93 | -            ['DummyInterface', '{{ interface }}'], class_basename($interface), $stub | |
| 93 | +            [ 'DummyInterface', '{{ interface }}' ], class_basename($interface), $stub | |
| 94 | 94 | ); | 
| 95 | 95 | |
| 96 | 96 | return str_replace( | 
| 97 | -            ['DummyFullInterface', '{{ interfaceNamespace }}'], trim($interface, '\\'), $stub | |
| 97 | +            [ 'DummyFullInterface', '{{ interfaceNamespace }}' ], trim($interface, '\\'), $stub | |
| 98 | 98 | ); | 
| 99 | 99 | } | 
| 100 | 100 | |
| @@ -156,11 +156,11 @@ discard block | ||
| 156 | 156 | protected function getOptions() | 
| 157 | 157 |      { | 
| 158 | 158 | return [ | 
| 159 | - ['contract', 'c', InputOption::VALUE_NONE, 'Create an interface class for this repository'], | |
| 160 | - ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the repository already exists'], | |
| 161 | - ['interface', 'i', InputOption::VALUE_OPTIONAL, 'Create an interface namespace for this repository'], | |
| 162 | - ['model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this repository'], | |
| 163 | - ['user', 'u', InputOption::VALUE_NONE, 'Create extra fetch by user id functions for this repository'], | |
| 159 | + [ 'contract', 'c', InputOption::VALUE_NONE, 'Create an interface class for this repository' ], | |
| 160 | + [ 'force', 'f', InputOption::VALUE_NONE, 'Create the class even if the repository already exists' ], | |
| 161 | + [ 'interface', 'i', InputOption::VALUE_OPTIONAL, 'Create an interface namespace for this repository' ], | |
| 162 | + [ 'model', 'm', InputOption::VALUE_REQUIRED, 'Create a model namespace for this repository' ], | |
| 163 | + [ 'user', 'u', InputOption::VALUE_NONE, 'Create extra fetch by user id functions for this repository' ], | |
| 164 | 164 | ]; | 
| 165 | 165 | } | 
| 166 | 166 | |
| @@ -186,8 +186,8 @@ discard block | ||
| 186 | 186 | |
| 187 | 187 | $path = $this->getPath($name); | 
| 188 | 188 | |
| 189 | -        if ((! $this->hasOption('force') || | |
| 190 | -             ! $this->option('force')) && | |
| 189 | +        if ((!$this->hasOption('force') || | |
| 190 | +             !$this->option('force')) && | |
| 191 | 191 |               $this->alreadyExists($this->getNameInput())) { | 
| 192 | 192 | $this->components->error($this->type.' already exists.'); | 
| 193 | 193 | |