Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
37 | public function value(array $data, $owner = null) |
||
38 | { |
||
39 | try { |
||
40 | return $this->mapping->value($data, $owner); |
||
41 | } catch (MappingFailure $firstFailure) { |
||
42 | try { |
||
43 | return $this->alternative->value($data, $owner); |
||
44 | } catch (MappingFailure $secondFailure) { |
||
45 | throw CompositeMappingFailure::both($firstFailure, $secondFailure); |
||
46 | } |
||
50 |