From cc769a66680208123d1edc4fd4f74478f3b555c5 Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Wed, 29 Apr 2020 19:17:52 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Commands/RepositoryCommand.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Commands/RepositoryCommand.php b/src/Commands/RepositoryCommand.php index 7277b1900..aa5f3aada 100644 --- a/src/Commands/RepositoryCommand.php +++ b/src/Commands/RepositoryCommand.php @@ -22,7 +22,7 @@ class RepositoryCommand extends GeneratorCommand public function handle() { - if (parent::handle() === false && !$this->option('force')) { + if (parent::handle() === false && ! $this->option('force')) { return false; } @@ -56,7 +56,7 @@ public function handle() /** * Build the class with the given name. - * This method should return the file class content + * This method should return the file class content. * * @param string $name * @return string @@ -81,14 +81,14 @@ protected function guessQualifiedModelName() { $model = Str::singular(class_basename(Str::before($this->getNameInput(), 'Repository'))); - return str_replace('/', '\\', $this->rootNamespace() . '/Models//' . $model); + return str_replace('/', '\\', $this->rootNamespace().'/Models//'.$model); } protected function buildMigration() { $table = Str::snake(Str::pluralStudly(class_basename($this->guessQualifiedModelName()))); - $guessMigration = 'Create' . Str::studly($table) . 'Table'; + $guessMigration = 'Create'.Str::studly($table).'Table'; if (false === class_exists($guessMigration)) { $migration = Str::snake($guessMigration); @@ -97,7 +97,7 @@ protected function buildMigration() if ($yes) { $this->call('make:migration', [ 'name' => $migration, - '--create' => $table + '--create' => $table, ]); } } @@ -120,7 +120,7 @@ protected function buildModel() $yes = $this->confirm("Do you want to generate the model [{$model}]?"); if ($yes) { - $this->call('make:model', ['name' => str_replace('\\\\', '\\', $model),]); + $this->call('make:model', ['name' => str_replace('\\\\', '\\', $model)]); } } } @@ -131,18 +131,18 @@ protected function buildFactory() $this->call('make:factory', [ 'name' => "{$factory}Factory", - '--model' => str_replace('\\\\', '\\', $this->guessQualifiedModelName()) + '--model' => str_replace('\\\\', '\\', $this->guessQualifiedModelName()), ]); } protected function getStub() { - return __DIR__ . '/stubs/repository.stub'; + return __DIR__.'/stubs/repository.stub'; } protected function getDefaultNamespace($rootNamespace) { - return $rootNamespace . '\Restify'; + return $rootNamespace.'\Restify'; } protected function getOptions()