From baa6a61ce16b7fd4e23bc90350dfbe8cfb8bc66f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 15 Dec 2024 12:03:16 +0100 Subject: [PATCH] Use explicit type conversion --- .../framework/src/Framework/Actions/Internal/FileFinder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Framework/Actions/Internal/FileFinder.php b/packages/framework/src/Framework/Actions/Internal/FileFinder.php index 014755b1c22..7ca447bde72 100644 --- a/packages/framework/src/Framework/Actions/Internal/FileFinder.php +++ b/packages/framework/src/Framework/Actions/Internal/FileFinder.php @@ -7,6 +7,7 @@ use Hyde\Facades\Filesystem; use Hyde\Hyde; use Illuminate\Support\Collection; +use SplFileInfo; use Symfony\Component\Finder\Finder; /** @@ -40,8 +41,8 @@ public static function handle(string $directory, string|array|false $matchExtens }, $matchExtensions)).')$/i'); } - return collect($finder)->map(function (string $file): string { - return Hyde::pathToRelative($file); + return collect($finder)->map(function (SplFileInfo $file): string { + return Hyde::pathToRelative($file->getPathname()); })->sort()->values(); } }