File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Filter options
src/Symfony/Component/Security/Core/Authorization/Voter Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Original file line number Diff line number Diff line change 18
18
*
19
19
* @author Roman Marintšenko <inoryy@gmail.com>
20
20
* @author Grégoire Pineau <lyrixx@lyrixx.info>
21
+ *
22
+ * @template TAttribute of string
23
+ * @template TSubject of mixed
21
24
*/
22
25
abstract class Voter implements VoterInterface, CacheableVoterInterface
23
26
{
@@ -74,13 +77,19 @@ public function supportsType(string $subjectType): bool
74
77
/**
75
78
* Determines if the attribute and subject are supported by this voter.
76
79
*
77
- * @param $subject The subject to secure, e.g. an object the user wants to access or any other PHP type
80
+ * @param mixed $subject The subject to secure, e.g. an object the user wants to access or any other PHP type
81
+ *
82
+ * @psalm-assert-if-true TSubject $subject
83
+ * @psalm-assert-if-true TAttribute $attribute
78
84
*/
79
85
abstract protected function supports (string $ attribute , mixed $ subject ): bool ;
80
86
81
87
/**
82
88
* Perform a single access check operation on a given attribute, subject and token.
83
89
* It is safe to assume that $attribute and $subject already passed the "supports()" method check.
90
+ *
91
+ * @param TAttribute $attribute
92
+ * @param TSubject $subject
84
93
*/
85
94
abstract protected function voteOnAttribute (string $ attribute , mixed $ subject , TokenInterface $ token ): bool ;
86
95
}
You can’t perform that action at this time.
0 commit comments