Skip to content

Commit

Permalink
Restore psalm-external-mutation-free annotations
Browse files Browse the repository at this point in the history
Although I could not find a PHPStan equivalent, these could still be
useful for end users and should not be removed in a patch release.
  • Loading branch information
greg0ire committed Oct 23, 2024
1 parent a17744e commit f202114
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Persistence/Reflection/EnumReflectionProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,31 @@ public function __construct(ReflectionProperty $originalReflectionProperty, stri
$this->enumType = $enumType;
}

/**
* {@inheritDoc}
*
* @psalm-external-mutation-free
*/
public function getDeclaringClass(): ReflectionClass
{
return $this->originalReflectionProperty->getDeclaringClass();
}

/**
* {@inheritDoc}
*
* @psalm-external-mutation-free
*/
public function getName(): string
{
return $this->originalReflectionProperty->getName();
}

/**
* {@inheritDoc}
*
* @psalm-external-mutation-free
*/
public function getType(): ?ReflectionType
{
return $this->originalReflectionProperty->getType();
Expand Down Expand Up @@ -134,16 +149,31 @@ private function toEnum($value)
return $this->enumType::from($value);
}

/**
* {@inheritDoc}
*
* @psalm-external-mutation-free
*/
public function getModifiers(): int
{
return $this->originalReflectionProperty->getModifiers();
}

/**
* {@inheritDoc}
*
* @psalm-external-mutation-free
*/
public function getDocComment(): string|false
{
return $this->originalReflectionProperty->getDocComment();
}

/**
* {@inheritDoc}
*
* @psalm-external-mutation-free
*/
public function isPrivate(): bool
{
return $this->originalReflectionProperty->isPrivate();
Expand Down

0 comments on commit f202114

Please sign in to comment.