| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function get(AuthConfigInterface $config): AuthHandlerInterface |
||
| 30 | { |
||
| 31 | $handler = (new ConditionMatch($this->handlers))->find( |
||
| 32 | function (AuthHandlerInterface $currentHandler) use ($config) { |
||
| 33 | return $currentHandler->suits($config); |
||
| 34 | } |
||
| 35 | ); |
||
| 36 | |||
| 37 | if (!$handler instanceof AuthHandlerInterface) { |
||
| 38 | throw AuthHandlerException::becauseHandlerNotFound(); |
||
| 39 | } |
||
| 40 | |||
| 41 | return $handler; |
||
| 42 | } |
||
| 44 |