We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53d1bdb commit d298796Copy full SHA for d298796
src/PhpGenerator/ClassType.php
@@ -70,7 +70,7 @@ public static function from($from)
70
$from = $from instanceof \ReflectionClass ? $from : new \ReflectionClass($from);
71
$class = new static($from->getShortName());
72
$class->type = $from->isInterface() ? 'interface' : (PHP_VERSION_ID >= 50400 && $from->isTrait() ? 'trait' : 'class');
73
- $class->final = $from->isFinal();
+ $class->final = $from->isFinal() && $class->type === 'class';
74
$class->abstract = $from->isAbstract() && $class->type === 'class';
75
$class->implements = $from->getInterfaceNames();
76
$class->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n\t"));
0 commit comments