Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Lines | 11 |
Ratio | 100 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | $permissions = $this->getPermissions(); |
||
21 | |||
22 | if (is_array($permission)) { |
||
23 | $permissionCount = count($permission); |
||
24 | $intersection = array_intersect($permissions, $permission); |
||
25 | $intersectionCount = count($intersection); |
||
26 | |||
27 | return $permissionCount == $intersectionCount; |
||
28 | } |
||
29 | |||
30 | return in_array($permission, $permissions); |
||
31 | } |
||
60 |