$prefixLen = \
strlen($prefix);
$paths = null;
if ('' ===
$this->pattern &&
is_file($this->prefix
)) { $paths =
[$this->prefix => null
];
} elseif (!
str_starts_with($this->prefix, 'phar://'
) && (null !==
$regex || !
str_contains($this->pattern, '/**/'
))) { if (!
str_contains($this->pattern, '/**/'
) && ($this->globBrace || !
str_contains($this->pattern, '{'
))) { $paths =
array_fill_keys(glob($this->prefix.
$this->pattern, \GLOB_NOSORT |
$this->globBrace
), null
);
} elseif (!
str_contains($this->pattern, '\\'
) || !
preg_match('/\\\\[,{}]/',
$this->pattern
)) { $paths =
[];
foreach ($this->
expandGlob($this->pattern
) as $p) { if (false !==
$i =
strpos($p, '/**/'
)) { $p =
substr_replace($p, '/*',
$i);
} $paths +=
array_fill_keys(glob($this->prefix.
$p, \GLOB_NOSORT
), false !==
$i ?
$regex : null
);
} } } if (null !==
$paths) { uksort($paths, 'strnatcmp'
);
foreach ($paths as $path =>
$regex) {