mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-30 16:58:41 +00:00 
			
		
		
		
	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:
		| @@ -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; | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user