diff --git a/src/PhpFileParser.php b/src/PhpFileParser.php index 80f6559..6fa1284 100644 --- a/src/PhpFileParser.php +++ b/src/PhpFileParser.php @@ -60,6 +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) { return []; }