Skip to content

Commit

Permalink
Revert get method of RightsTrait.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentmuller committed Jan 21, 2025
1 parent cee154f commit 11ad577
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Traits/RightsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ trait RightsTrait
private ?array $rights = null;

/**
* NB: The mixed value must be returned. If not, SymfonyInsight will raise an exception.
*
* @return ?FlagBag<EntityPermission>
*/
public function __get(string $name): ?FlagBag
public function __get(string $name): mixed
{
$entity = EntityName::tryFromField($name);

Expand Down Expand Up @@ -84,7 +86,7 @@ public function __set(string $name, mixed $value): void
*
* @return FlagBag<EntityPermission>
*/
public function getPermission(EntityName $entity): mixed
public function getPermission(EntityName $entity): FlagBag
{
$offset = $entity->offset();
$rights = $this->getRights();
Expand Down

0 comments on commit 11ad577

Please sign in to comment.