From 24d1b554372fd2ec276a5cb1a4c5a232edec2067 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 16 Aug 2023 08:38:16 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- src/Commands/Generator.php | 6 ++++-- src/Contracts/GeneratesCodeListener.php | 5 +++++ src/GeneratesCode.php | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Commands/Generator.php b/src/Commands/Generator.php index 3c74629..5f04a33 100644 --- a/src/Commands/Generator.php +++ b/src/Commands/Generator.php @@ -107,9 +107,11 @@ public function codeHasBeenGenerated(string $className): int } /** - * Run after Code successfully generated. + * Code successfully generated. + * + * @return void */ - public function afterCodeHasBeenGenerated(string $className, string $path): int + public function afterCodeHasBeenGenerated(string $className, string $path): void { if (\in_array(CreatesMatchingTest::class, class_uses_recursive($this))) { /** @phpstan-ignore-next-line */ diff --git a/src/Contracts/GeneratesCodeListener.php b/src/Contracts/GeneratesCodeListener.php index f49311e..9ce556e 100644 --- a/src/Contracts/GeneratesCodeListener.php +++ b/src/Contracts/GeneratesCodeListener.php @@ -18,6 +18,11 @@ public function codeAlreadyExists(string $className): mixed; */ public function codeHasBeenGenerated(string $className): mixed; + /** + * Code successfully generated. + */ + public function afterCodeHasBeenGenerated(string $className, string $path): void; + /** * Get the stub file for the generator. */ diff --git a/src/GeneratesCode.php b/src/GeneratesCode.php index d486bed..ad384ff 100644 --- a/src/GeneratesCode.php +++ b/src/GeneratesCode.php @@ -2,7 +2,6 @@ namespace Orchestra\Canvas\Core; -use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Foundation\Auth\User; use Illuminate\Support\Str;