Skip to content

Commit 8f5fa3c

Browse files
authored
Fix always-false conditional (#28)
`$matches` is `[[]]` when pattern is not matched, something like `[['class ']]` otherwise
1 parent 465154a commit 8f5fa3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpFileParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static function findClasses(string $path): array
6060

6161
// return early if there is no chance of matching anything in this file
6262
Preg::matchAllStrictGroups('{\b(?:class|interface|trait'.$extraTypes.')\s}i', $contents, $matches);
63-
if ([] === $matches) {
63+
if ([] === $matches[0]) {
6464
return [];
6565
}
6666

0 commit comments

Comments
 (0)