Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 0 |
1 | <?php |
||
27 | 19 | public function resolve(object $object, array $options = []): ObjectProxy |
|
28 | { |
||
29 | 19 | foreach ($this->objectProxyFactories as $objectProxyFactory) { |
|
30 | 19 | if ($objectProxyFactory->supports($object, $options)) { |
|
31 | 19 | return $objectProxyFactory->build($object, $options); |
|
32 | } |
||
33 | } |
||
34 | |||
35 | throw new \RuntimeException(sprintf('No object proxy found for "%s"', get_class($object))); |
||
36 | } |
||
38 |