From d003141c65b83b27317aefe215a6c432939cbfa3 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 9 Jan 2025 15:40:27 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- src/Workbench.php | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/Workbench.php b/src/Workbench.php index 9b26a1b..c56ae3c 100644 --- a/src/Workbench.php +++ b/src/Workbench.php @@ -23,12 +23,15 @@ class Workbench extends \Orchestra\Testbench\Workbench\Workbench * Get the path to the application (Laravel) folder. * * @no-named-arguments + * + * @param array|string ...$path */ public static function applicationPath(array|string $path = ''): string { - return base_path( - join_paths(...Arr::wrap(\func_num_args() > 1 ? \func_get_args() : $path)) - ); + /** @var array $paths */ + $paths = Arr::wrap(\func_num_args() > 1 ? \func_get_args() : $path); + + return base_path(join_paths(...$paths)); } /** @@ -47,26 +50,32 @@ public static function laravelPath(array|string $path = ''): string * Get the path to the package folder. * * @no-named-arguments + * + * @param array|string ...$path */ public static function packagePath(array|string $path = ''): string { - $path = Arr::wrap(\func_num_args() > 1 ? \func_get_args() : $path); + /** @var array $paths */ + $paths = Arr::wrap(\func_num_args() > 1 ? \func_get_args() : $path); - /** @phpstan-ignore argument.named */ - return package_path(...$path); + /** @phpstan-ignore argument.type */ + return package_path(...$paths); } /** * Get the path to the workbench folder. * * @no-named-arguments + * + * @param array|string ...$path */ public static function path(array|string $path = ''): string { - $path = Arr::wrap(\func_num_args() > 1 ? \func_get_args() : $path); + /** @var array $paths */ + $paths = Arr::wrap(\func_num_args() > 1 ? \func_get_args() : $path); - /** @phpstan-ignore argument.named */ - return workbench_path(...$path); + /** @phpstan-ignore argument.type */ + return workbench_path(...$paths); } /**