Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 authored Dec 19, 2023
1 parent cb70f85 commit fe11b70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Security/Authorization/Voter/UserAclVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function supportsAttribute($attribute): bool
/**
* @param mixed $subject
* @param mixed[] $attributes
*
* @return self::ACCESS_ABSTAIN|self::ACCESD_DENIED

Check failure on line 40 in src/Security/Authorization/Voter/UserAclVoter.php

View workflow job for this annotation

GitHub Actions / Psalm

ImplementedReturnTypeMismatch

src/Security/Authorization/Voter/UserAclVoter.php:40:16: ImplementedReturnTypeMismatch: The inherited return type '-1|0|1' for Symfony\Component\Security\Core\Authorization\Voter\VoterInterface::vote is different to the implemented return type for Sonata\UserBundle\Security\Authorization\Voter\UserAclVoter::vote '0|Sonata\UserBundle\Security\Authorization\Voter\UserAclVoter::ACCESD_DENIED' (see https://psalm.dev/123)

Check failure on line 40 in src/Security/Authorization/Voter/UserAclVoter.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedConstant

src/Security/Authorization/Voter/UserAclVoter.php:40:16: UndefinedConstant: Constant Sonata\UserBundle\Security\Authorization\Voter\UserAclVoter::ACCESD_DENIED is not defined (see https://psalm.dev/020)

Check failure on line 40 in src/Security/Authorization/Voter/UserAclVoter.php

View workflow job for this annotation

GitHub Actions / Psalm

MismatchingDocblockReturnType

src/Security/Authorization/Voter/UserAclVoter.php:40:16: MismatchingDocblockReturnType: Docblock has incorrect return type 'Sonata\UserBundle\Security\Authorization\Voter\UserAclVoter::ACCESD_DENIED|Sonata\UserBundle\Security\Authorization\Voter\UserAclVoter::ACCESS_ABSTAIN', should be 'int' (see https://psalm.dev/142)
*/
public function vote(TokenInterface $token, $subject, array $attributes): int

Check failure on line 42 in src/Security/Authorization/Voter/UserAclVoter.php

View workflow job for this annotation

GitHub Actions / PHPStan

PHPDoc tag @return contains unresolvable type.
{
Expand Down

0 comments on commit fe11b70

Please sign in to comment.