Passed
Branch develop (7f369c)
by Nicolas
04:17
created

CommentVoter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A supports() 0 3 2
1
<?php
2
3
namespace App\Security\Voter;
4
5
use App\Entity\Comment;
6
7
/**
8
 * CommentVoter.
9
 */
10
class CommentVoter extends ArticleVoter
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 4
    protected function supports($attribute, $subject)
16
    {
17 4
        return in_array($attribute, ['OWNER'], true) && $subject instanceof Comment;
18
    }
19
}
20