Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
28 | 8 | public function tryToUnserializeValue(string $objectClassName, $serializedValue) |
|
29 | { |
||
30 | 8 | foreach ($this->unserializers as $adapterLocator) { |
|
31 | try { |
||
32 | 4 | return $adapterLocator->tryToUnserializeValue($objectClassName, $serializedValue); |
|
33 | 4 | } catch (AdapterNotFoundException $exception) { |
|
34 | 1 | continue; |
|
35 | 4 | } catch (ValueNotUnserializable $exception) { |
|
36 | 4 | continue; |
|
37 | } |
||
38 | } |
||
39 | |||
40 | 6 | throw new AdapterNotFoundException( |
|
41 | 6 | sprintf("None of the %d adapter locators could find an adapter", count($this->unserializers))); |
|
42 | } |
||
43 | } |