Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function filterItems(MutableContainerInterface $container): MutableContainerInterface |
||
19 | { |
||
20 | $filtered = clone $container; |
||
21 | $filtered->reset(); |
||
22 | |||
23 | array_map( |
||
24 | [$filtered, 'add'], |
||
25 | array_filter( |
||
26 | $container->getItems(), |
||
27 | function (ItemInterface $item) { |
||
28 | return $item instanceof HasSupportedRolesInterface; |
||
29 | } |
||
30 | ) |
||
31 | ); |
||
32 | |||
33 | return $filtered; |
||
34 | } |
||
36 |