Skip to content

Commit

Permalink
Fixed ClassMetadata $modifiers type, third attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Feb 8, 2024
1 parent ebc7924 commit d435718
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/PhpParserReflector/ContextualPhpParserReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ private function reflectClassModifiers(Stmt\ClassLike $node): int
$modifiers = ($node->isAbstract() ? ClassReflection::IS_EXPLICIT_ABSTRACT : 0)
+ ($node->isFinal() ? ClassReflection::IS_FINAL : 0);

if (defined(\ReflectionClass::class.'::IS_READONLY') && $node->isReadonly()) {
if (\defined(\ReflectionClass::class . '::IS_READONLY') && $node->isReadonly()) {
/**
* @var int-mask-of<\ReflectionClass::IS_*>
* @psalm-suppress MixedOperand, UnusedPsalmSuppress
*/
$modifiers += \ReflectionClass::IS_READONLY;
}

Expand Down

0 comments on commit d435718

Please sign in to comment.