mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Update directory targeting logic to support glob patterns
This commit is contained in:
@ -84,8 +84,10 @@ final class UsesCall
|
|||||||
}, $targets);
|
}, $targets);
|
||||||
|
|
||||||
$this->targets = array_reduce($targets, function (array $accumulator, string $target): array {
|
$this->targets = array_reduce($targets, function (array $accumulator, string $target): array {
|
||||||
if (is_dir($target) || file_exists($target)) {
|
if ($matches = glob($target)) {
|
||||||
$accumulator[] = (string) realpath($target);
|
foreach ($matches as $file) {
|
||||||
|
$accumulator[] = (string) realpath($file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $accumulator;
|
return $accumulator;
|
||||||
|
|||||||
Reference in New Issue
Block a user