diff --git a/packages/framework/src/Foundation/Kernel/Filesystem.php b/packages/framework/src/Foundation/Kernel/Filesystem.php index 193576a0be8..cabd75d816f 100644 --- a/packages/framework/src/Foundation/Kernel/Filesystem.php +++ b/packages/framework/src/Foundation/Kernel/Filesystem.php @@ -211,7 +211,7 @@ public function findFiles(string $directory, string|false $matchExtension = fals $files = collect(); foreach ($finder as $file) { - $files->push(str_replace($directory . DIRECTORY_SEPARATOR, '', $file->getRealPath())); + $files->push(str_replace($directory.DIRECTORY_SEPARATOR, '', $file->getRealPath())); } return $files; diff --git a/packages/framework/tests/Unit/FilesystemFindFilesTest.php b/packages/framework/tests/Unit/FilesystemFindFilesTest.php index 8ee9582a07a..da126c3e1e5 100644 --- a/packages/framework/tests/Unit/FilesystemFindFilesTest.php +++ b/packages/framework/tests/Unit/FilesystemFindFilesTest.php @@ -8,7 +8,6 @@ use Hyde\Testing\UnitTestCase; use Hyde\Testing\CreatesTemporaryFiles; use Hyde\Foundation\Kernel\Filesystem; -use Illuminate\Support\Collection; /** * @covers \Hyde\Foundation\Kernel\Filesystem::findFiles @@ -75,7 +74,6 @@ public function testFindFilesReturnsCorrectFilesWhenUsingNestedSubdirectoriesOfD $this->assertSameArray(['apple.md', 'nested/banana.md'], 'directory', 'md', true); } - protected function assertSameArray(array $expected, string $directory, string|false $matchExtension = false, bool $recursive = false): void { $files = (new Filesystem(Hyde::getInstance()))->findFiles($directory, $matchExtension, $recursive);