| Conditions | 3 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | 3 | private function getCheckers(ContainerInterface $container, array $checkers): array |
|
| 44 | { |
||
| 45 | return \array_map(static function ($checker) use ($container) { |
||
| 46 | 3 | if ($checker instanceof ClaimChecker) { |
|
| 47 | 1 | return $checker; |
|
| 48 | } |
||
| 49 | |||
| 50 | 3 | $checker = $container->get($checker); |
|
| 51 | |||
| 52 | 3 | if (! $checker instanceof ClaimChecker) { |
|
| 53 | throw new InvalidArgumentException('Invalid claim checker'); |
||
| 54 | } |
||
| 55 | |||
| 56 | 3 | return $checker; |
|
| 57 | 3 | }, $checkers); |
|
| 58 | } |
||
| 60 |