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