From 484f6c7b540d37f934d82148caf106050646b4db Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 12 Sep 2023 06:21:00 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- src/Commands/Generator.php | 2 +- src/TestGenerator.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Commands/Generator.php b/src/Commands/Generator.php index d335fd7..83153d9 100644 --- a/src/Commands/Generator.php +++ b/src/Commands/Generator.php @@ -8,6 +8,7 @@ use Orchestra\Canvas\Core\Contracts\GeneratesCodeListener; use Orchestra\Canvas\Core\GeneratesCode; use Orchestra\Canvas\Core\Presets\Preset; +use Orchestra\Canvas\Core\TestGenerator; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -202,7 +203,6 @@ public function generatingCode(string $stub, string $className): string public function afterCodeHasBeenGenerated(string $className, string $path) { if (\in_array(CreatesMatchingTest::class, class_uses_recursive($this))) { - /** @phpstan-ignore-next-line */ $this->handleTestCreationUsingCanvas($path); } } diff --git a/src/TestGenerator.php b/src/TestGenerator.php index 6b7184e..8c7ca6a 100644 --- a/src/TestGenerator.php +++ b/src/TestGenerator.php @@ -2,6 +2,8 @@ namespace Orchestra\Canvas\Core; +use Illuminate\Support\Str; + trait TestGenerator { /**