Conditions | 5 |
Paths | 7 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 18 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
56 | 2 | public function contains($policyRuleAttributes, $attributes, $extraData = []) { |
|
|
|||
57 | 2 | foreach($extraData['attribute']->getValue() as $attribute) { |
|
58 | 2 | $result = true; |
|
59 | 2 | foreach($policyRuleAttributes as $pra) { |
|
60 | 2 | $attributeData = $pra->getAttribute(); |
|
61 | 2 | if(!$this->comparisonManager->compare( |
|
62 | 2 | $pra->getComparisonType(), |
|
63 | 2 | $pra->getComparison(), |
|
64 | 2 | $pra->getValue(), |
|
65 | 2 | $this->comparisonManager->getAttributeManager()->retrieveAttribute($attributeData, $extraData['user'], $attribute) |
|
66 | 2 | )) { |
|
67 | 2 | $result = false; |
|
68 | 2 | break; |
|
69 | } |
||
70 | 2 | } |
|
71 | 2 | if($result === true) { |
|
72 | 2 | return true; |
|
73 | } |
||
74 | 2 | } |
|
75 | 2 | return false; |
|
76 | } |
||
77 | } |
||
78 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.