Skip to content

Commit

Permalink
Use explicit type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 15, 2024
1 parent 7f99a23 commit baa6a61
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Facades\Filesystem;
use Hyde\Hyde;
use Illuminate\Support\Collection;
use SplFileInfo;
use Symfony\Component\Finder\Finder;

/**
Expand Down Expand Up @@ -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();
}
}

0 comments on commit baa6a61

Please sign in to comment.