From 662d1a35ffb28fc6ae68eb067fa4511aebc6e7d5 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 12 Aug 2021 20:29:21 +0100 Subject: [PATCH] generate-registry-annotations: skip files that don't contain classes --- build/generate-registry-annotations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/generate-registry-annotations.php b/build/generate-registry-annotations.php index fe9b444b6..2eece2cae 100644 --- a/build/generate-registry-annotations.php +++ b/build/generate-registry-annotations.php @@ -49,7 +49,7 @@ foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($argv[1], throw new \RuntimeException("Failed to get contents of $file"); } - if(preg_match("/^namespace (.+);$/m", $contents, $matches) !== 1){ + if(preg_match("/^namespace (.+);$/m", $contents, $matches) !== 1 || preg_match('/^((final|abstract)\s+)?class /m', $contents) !== 1){ continue; } $shortClassName = basename($file, ".php");