From 5dab07b0a94ee2e7d5293d6666561c1df4193a48 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 24 Nov 2023 18:55:36 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- src/Console/ConsoleMakeCommand.php | 1 - src/Console/EventMakeCommand.php | 3 +++ src/Console/ExceptionMakeCommand.php | 3 +++ src/Console/FactoryMakeCommand.php | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Console/ConsoleMakeCommand.php b/src/Console/ConsoleMakeCommand.php index 0a9954c8..dc005524 100644 --- a/src/Console/ConsoleMakeCommand.php +++ b/src/Console/ConsoleMakeCommand.php @@ -23,7 +23,6 @@ class ConsoleMakeCommand extends \Illuminate\Foundation\Console\ConsoleMakeComma * * @return void */ - #[\Override] public function __construct(Filesystem $files) { parent::__construct($files); diff --git a/src/Console/EventMakeCommand.php b/src/Console/EventMakeCommand.php index d69b680a..bf44bc77 100644 --- a/src/Console/EventMakeCommand.php +++ b/src/Console/EventMakeCommand.php @@ -35,6 +35,7 @@ public function __construct(Filesystem $files) * * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ + #[\Override] public function handle() { return $this->generateCode() ? self::SUCCESS : self::FAILURE; @@ -46,6 +47,7 @@ public function handle() * @param string $name * @return string */ + #[\Override] protected function getPath($name) { return $this->getPathUsingCanvas($name); @@ -56,6 +58,7 @@ protected function getPath($name) * * @return string */ + #[\Override] protected function rootNamespace() { return $this->rootNamespaceUsingCanvas(); diff --git a/src/Console/ExceptionMakeCommand.php b/src/Console/ExceptionMakeCommand.php index 1a41532b..2393af35 100644 --- a/src/Console/ExceptionMakeCommand.php +++ b/src/Console/ExceptionMakeCommand.php @@ -35,6 +35,7 @@ public function __construct(Filesystem $files) * * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ + #[\Override] public function handle() { return $this->generateCode() ? self::SUCCESS : self::FAILURE; @@ -46,6 +47,7 @@ public function handle() * @param string $name * @return string */ + #[\Override] protected function getPath($name) { return $this->getPathUsingCanvas($name); @@ -56,6 +58,7 @@ protected function getPath($name) * * @return string */ + #[\Override] protected function rootNamespace() { return $this->rootNamespaceUsingCanvas(); diff --git a/src/Console/FactoryMakeCommand.php b/src/Console/FactoryMakeCommand.php index 2dcb792f..b6fe9b97 100644 --- a/src/Console/FactoryMakeCommand.php +++ b/src/Console/FactoryMakeCommand.php @@ -37,6 +37,7 @@ public function __construct(Filesystem $files) * * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ + #[\Override] public function handle() { return $this->generateCode() ? self::SUCCESS : self::FAILURE; @@ -59,6 +60,7 @@ protected function resolveDefaultStubPath($stub) * @param string $name * @return string */ + #[\Override] protected function getNamespace($name) { return rtrim($this->generatorPreset()->factoryNamespace(), '\\'); @@ -67,6 +69,7 @@ protected function getNamespace($name) /** * Get the generator preset source path. */ + #[\Override] protected function getGeneratorSourcePath(): string { return $this->generatorPreset()->factoryPath(); @@ -78,6 +81,7 @@ protected function getGeneratorSourcePath(): string * @param string $name * @return string */ + #[\Override] protected function guessModelName($name) { if (str_ends_with($name, 'Factory')) { @@ -93,6 +97,7 @@ protected function guessModelName($name) * @param string $name * @return string */ + #[\Override] protected function getPath($name) { return $this->getPathUsingCanvas($name); @@ -103,6 +108,7 @@ protected function getPath($name) * * @return string */ + #[\Override] protected function rootNamespace() { return $this->rootNamespaceUsingCanvas(); @@ -113,6 +119,7 @@ protected function rootNamespace() * * @return string|null */ + #[\Override] protected function userProviderModel() { return $this->userProviderModelUsingCanvas();