From c9180e590ed220650d103c7dddb319701ec19d26 Mon Sep 17 00:00:00 2001 From: Mohammad Zahed Date: Wed, 7 Jun 2023 14:56:19 +0300 Subject: [PATCH] Update directory targeting logic to support glob patterns --- src/PendingCalls/UsesCall.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PendingCalls/UsesCall.php b/src/PendingCalls/UsesCall.php index fc297698..8dfd9289 100644 --- a/src/PendingCalls/UsesCall.php +++ b/src/PendingCalls/UsesCall.php @@ -84,8 +84,10 @@ final class UsesCall }, $targets); $this->targets = array_reduce($targets, function (array $accumulator, string $target): array { - if (is_dir($target) || file_exists($target)) { - $accumulator[] = (string) realpath($target); + if ($matches = glob($target)) { + foreach ($matches as $file) { + $accumulator[] = (string) realpath($file); + } } return $accumulator;