From 30078db841bc9402f464278cd45280c159d98886 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 19 Jun 2024 09:51:21 +0200 Subject: [PATCH] Type-hint $subject in StoredObjectVoterInterface.php Since the subject passed to these voters should\ always be of the type StoredObject, type-hinting\ added. --- .../Security/Authorization/StoredObjectVoterInterface.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoterInterface.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoterInterface.php index 47b93eabb..a3a76e79a 100644 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoterInterface.php +++ b/src/Bundle/ChillDocStoreBundle/Security/Authorization/StoredObjectVoterInterface.php @@ -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; }