Skip to content

Commit b8e9cae

Browse files
Use stricter comparison
1 parent ecfa013 commit b8e9cae

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Factory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ private function resolveWildcards(array $paths): array
9898
$_paths = [[]];
9999

100100
foreach ($paths as $path) {
101-
if ($locals = $this->globstar($path)) {
101+
$locals = $this->globstar($path);
102+
103+
if ($locals !== []) {
102104
$_paths[] = array_map('\realpath', $locals);
103105
} else {
104106
// @codeCoverageIgnoreStart

src/Iterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function accept(): bool
7272
private function acceptPath(string $path): bool
7373
{
7474
// Filter files in hidden directories by checking path that is relative to the base path.
75-
if (preg_match('=/\.[^/]*/=', str_replace((string) $this->basePath, '', $path))) {
75+
if (preg_match('=/\.[^/]*/=', str_replace((string) $this->basePath, '', $path)) === 1) {
7676
return false;
7777
}
7878

0 commit comments

Comments
 (0)