GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 1e86a6...7bf065 )
by Axel
9s
created

UserComparison   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 17
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isFieldEqual() 0 8 1
1
<?php
2
3
namespace PhpAbac\Comparison;
4
5
use PhpAbac\Model\Attribute;
6
7
class UserComparison extends AbstractComparison
8
{
9
    /**
10
     * @param string $attributeId
11
     * @param mixed $value
12
     * @param array $extraData
13
     * @return boolean
14
     */
15 2
    public function isFieldEqual($attributeId, $value, $extraData = []) {
16 2
        $attributeManager = $this->comparisonManager->getAttributeManager();
17
        // Create an attribute out of the extra data we have and compare its retrieved value to the expected one
18 2
        return $attributeManager->retrieveAttribute(
19 2
            $attributeManager->getAttribute($attributeId),
20 2
            $extraData['user']
21 2
        ) === $value;
22
    }
23
}
24