From 9873670dfea1bf0f3ad242698ac7e800503356a8 Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Wed, 29 Apr 2020 20:07:41 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Commands/PolicyCommand.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Commands/PolicyCommand.php b/src/Commands/PolicyCommand.php index 50958ac4b..4dc4ea2c9 100644 --- a/src/Commands/PolicyCommand.php +++ b/src/Commands/PolicyCommand.php @@ -14,7 +14,7 @@ class PolicyCommand extends GeneratorCommand public function handle() { - if (parent::handle() === false && !$this->option('force')) { + if (parent::handle() === false && ! $this->option('force')) { return false; } } @@ -42,7 +42,6 @@ protected function replaceModel($stub) protected function replaceQualifiedModel($stub) { - return str_replace('{{ modelQualified }}', $this->guessQualifiedModel(), $stub); } @@ -50,7 +49,7 @@ protected function guessQualifiedModel(): string { $model = Str::singular(class_basename(Str::beforeLast($this->getNameInput(), 'Policy'))); - return str_replace('/', '\\', $this->rootNamespace() . 'Models/' . $model); + return str_replace('/', '\\', $this->rootNamespace().'Models/'.$model); } protected function guessPolicyName() @@ -66,7 +65,7 @@ protected function guessPolicyName() protected function getPath($name) { - return $this->laravel['path'] . '/Policies/' . $this->guessPolicyName() . '.php'; + return $this->laravel['path'].'/Policies/'.$this->guessPolicyName().'.php'; } /** @@ -76,7 +75,7 @@ protected function getPath($name) */ protected function getStub() { - return __DIR__ . '/stubs/policy.stub'; + return __DIR__.'/stubs/policy.stub'; } /** @@ -87,7 +86,7 @@ protected function getStub() */ protected function getDefaultNamespace($rootNamespace) { - return $rootNamespace . '\Policies'; + return $rootNamespace.'\Policies'; } /**