From b44a626ebdf08444d114e3b91b870b9294d0d8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:39:09 +0100 Subject: [PATCH 1/4] Add type annotations to Finder::depth() in Filesystem Follow-up to #57573 --- src/Illuminate/Filesystem/Filesystem.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Illuminate/Filesystem/Filesystem.php b/src/Illuminate/Filesystem/Filesystem.php index bfcfdf8c078a..32dbaf767112 100644 --- a/src/Illuminate/Filesystem/Filesystem.php +++ b/src/Illuminate/Filesystem/Filesystem.php @@ -580,6 +580,7 @@ public function glob($pattern, $flags = 0) * * @param string $directory * @param bool $hidden + * @param string|int|string[]|int[] $levels * @return \Symfony\Component\Finder\SplFileInfo[] */ public function files($directory, $hidden = false, array|string|int $depth = 0) @@ -606,6 +607,7 @@ public function allFiles($directory, $hidden = false) * Get all of the directories within a given directory. * * @param string $directory + * @param string|int|string[]|int[] $levels * @return array */ public function directories($directory, array|string|int $depth = 0) From 6fa3a72e792447b537d047488dccf4323e4b4451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:42:51 +0100 Subject: [PATCH 2/4] Add return type annotation to `Filesystem::allDirectories()` Follow-up to #57565 --- src/Illuminate/Filesystem/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Filesystem/Filesystem.php b/src/Illuminate/Filesystem/Filesystem.php index 32dbaf767112..d941730e4e91 100644 --- a/src/Illuminate/Filesystem/Filesystem.php +++ b/src/Illuminate/Filesystem/Filesystem.php @@ -624,7 +624,7 @@ public function directories($directory, array|string|int $depth = 0) /** * Get all the directories within a given directory (recursive). * - * @return array + * @return string[] */ public function allDirectories(string $directory): array { From 5819ad7aa3d75049b57a7ffee3f986a720fbf008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:56:01 +0100 Subject: [PATCH 3/4] Correct variable name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: derian-cordoba Co-authored-by: Derian Córdoba <74283575+derian-cordoba@users.noreply.github.com> --- src/Illuminate/Filesystem/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Filesystem/Filesystem.php b/src/Illuminate/Filesystem/Filesystem.php index d941730e4e91..a4cb4c1dd65c 100644 --- a/src/Illuminate/Filesystem/Filesystem.php +++ b/src/Illuminate/Filesystem/Filesystem.php @@ -580,7 +580,7 @@ public function glob($pattern, $flags = 0) * * @param string $directory * @param bool $hidden - * @param string|int|string[]|int[] $levels + * @param string|int|string[]|int[] $depth * @return \Symfony\Component\Finder\SplFileInfo[] */ public function files($directory, $hidden = false, array|string|int $depth = 0) From d55b0f20799624085daf064f7e0a2adec47b4a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:56:13 +0100 Subject: [PATCH 4/4] Correct variable name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit derian-cordoba Co-authored-by: Derian Córdoba <74283575+derian-cordoba@users.noreply.github.com> --- src/Illuminate/Filesystem/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Filesystem/Filesystem.php b/src/Illuminate/Filesystem/Filesystem.php index a4cb4c1dd65c..c267cacf2318 100644 --- a/src/Illuminate/Filesystem/Filesystem.php +++ b/src/Illuminate/Filesystem/Filesystem.php @@ -607,7 +607,7 @@ public function allFiles($directory, $hidden = false) * Get all of the directories within a given directory. * * @param string $directory - * @param string|int|string[]|int[] $levels + * @param string|int|string[]|int[] $depth * @return array */ public function directories($directory, array|string|int $depth = 0)