mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
generate-registry-annotations: skip files that don't contain classes
This commit is contained in:
@ -49,7 +49,7 @@ foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($argv[1],
|
|||||||
throw new \RuntimeException("Failed to get contents of $file");
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
$shortClassName = basename($file, ".php");
|
$shortClassName = basename($file, ".php");
|
||||||
|
Reference in New Issue
Block a user