Type-hint $subject in StoredObjectVoterInterface.php

Since the subject passed to these voters should\
always be of the type StoredObject, type-hinting\ added.
This commit is contained in:
Julie Lenaerts 2024-06-19 09:51:21 +02:00
parent e9a9262fae
commit 4b82e67952

View File

@ -11,12 +11,13 @@ declare(strict_types=1);
namespace ChillDocStoreBundle\Security\Authorization;
use Chill\DocStoreBundle\Entity\StoredObject;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
interface StoredObjectVoterInterface {
public function supports(string $attribute, $subject): bool;
public function supports(string $attribute, StoredObject $subject): bool;
public function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool;
public function voteOnAttribute(string $attribute, StoredObject $subject, TokenInterface $token): bool;
}