diff --git a/src/PhpFileParser.php b/src/PhpFileParser.php index 27fc690..04d9828 100644 --- a/src/PhpFileParser.php +++ b/src/PhpFileParser.php @@ -60,7 +60,7 @@ public static function findClasses(string $path): array // return early if there is no chance of matching anything in this file Preg::matchAllStrictGroups('{\b(?:class|interface|trait'.$extraTypes.')\s}i', $contents, $matches); - if ([] === $matches) { + if ([] === $matches[0]) { return []; }