From d8e021edda65208cb2911e4efa5bab004f7d6c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Dalmolin?= Date: Tue, 29 Oct 2024 12:18:48 -0300 Subject: [PATCH] Not using a custom method from L11 --- src/Commands/GenerateEnumsCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/GenerateEnumsCommand.php b/src/Commands/GenerateEnumsCommand.php index 7324520..cf2c3ce 100644 --- a/src/Commands/GenerateEnumsCommand.php +++ b/src/Commands/GenerateEnumsCommand.php @@ -47,7 +47,7 @@ public function handle(): int */ protected function enums(): Collection { - return DiscoverEnums::within(app_path(config()->string('paragon.enums.paths.php'))) + return DiscoverEnums::within(app_path((string) config('paragon.enums.paths.php'))) ->reject(function ($enum) { if (! enum_exists($enum)) { return true; @@ -55,13 +55,13 @@ protected function enums(): Collection $reflector = new ReflectionEnum($enum); - $paths = Arr::map( + $pathsToIgnore = Arr::map( Arr::wrap(config('paragon.enums.paths.ignore')), fn (string $path): string => Str::finish(app_path($path), '/'), ); return $reflector->getAttributes(IgnoreParagon::class) - || Str::startsWith((string) $reflector->getFileName(), $paths); + || Str::startsWith((string) $reflector->getFileName(), $pathsToIgnore); }) ->values(); }