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

CommentVoter::supports()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 2
rs 10
c 0
b 0
f 0
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