Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | private function filter(ItemInterface $item): bool |
||
43 | { |
||
44 | if (false === $item instanceof HasSupportedRolesInterface) { |
||
45 | return true; |
||
46 | } |
||
47 | |||
48 | /** @var HasSupportedRolesInterface $item */ |
||
49 | foreach ($item->getSupportedRoles() as $role) { |
||
50 | if (in_array($role, $this->roles)) { |
||
51 | return true; |
||
52 | } |
||
53 | } |
||
54 | |||
55 | return false; |
||
56 | } |
||
58 |