| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function resolve(string $className): RuleHandlerInterface |
||
| 21 | { |
||
| 22 | try { |
||
| 23 | $ruleHandler = $this->container->get($className); |
||
| 24 | } catch (NotFoundExceptionInterface $e) { |
||
| 25 | throw new RuleHandlerNotFoundException($className, $e); |
||
| 26 | } |
||
| 27 | |||
| 28 | if (!$ruleHandler instanceof RuleHandlerInterface) { |
||
| 29 | throw new RuleHandlerInterfaceNotImplementedException($className); |
||
| 30 | } |
||
| 31 | |||
| 32 | return $ruleHandler; |
||
| 33 | } |
||
| 35 |