| Total Complexity | 5 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 85.71% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class AuthorVoter extends Voter |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * {@inheritdoc} |
||
| 18 | */ |
||
| 19 | 19 | protected function supports($attribute, $subject) |
|
| 20 | { |
||
| 21 | 19 | return 'AUTHOR' === $attribute && ($subject instanceof Article || $subject instanceof Comment); |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritdoc} |
||
| 26 | */ |
||
| 27 | 7 | protected function voteOnAttribute($attribute, $subject, TokenInterface $token) |
|
| 37 | } |
||
| 38 | } |
||
| 39 |