Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 77.78% |
Changes | 0 |
1 | <?php |
||
13 | class ArticleVoter extends Voter |
||
14 | { |
||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | 6 | protected function supports($attribute, $subject) |
|
19 | { |
||
20 | 6 | return in_array($attribute, ['OWNER'], true) && $subject instanceof Article; |
|
21 | } |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 6 | protected function voteOnAttribute($attribute, $subject, TokenInterface $token) |
|
41 | } |
||
42 | } |
||
43 |