Skip to content

Commit

Permalink
Fix generating final classes from reflection
Browse files Browse the repository at this point in the history
Signed-off-by: Ion Bazan <[email protected]>
  • Loading branch information
IonBazan committed Nov 21, 2022
1 parent 0337d92 commit 281746e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Generator/ClassGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public static function fromReflection(ClassReflection $classReflection)
}

$cg->setAbstract($classReflection->isAbstract());
$cg->setFinal($classReflection->isFinal());

// set the namespace
if ($classReflection->inNamespace()) {
Expand Down
2 changes: 1 addition & 1 deletion test/Generator/ClassGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ public function testClassWithPromotedParameterFromReflection(): void
$expectedOutput = <<<EOS
namespace LaminasTest\Code\Generator\TestAsset;
class ClassWithPromotedParameter
final class ClassWithPromotedParameter
{
public function __construct(private string \$promotedParameter)
{
Expand Down

0 comments on commit 281746e

Please sign in to comment.