Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
53 | public function value(array $data, $owner = null) |
||
54 | { |
||
55 | $objects = []; |
||
56 | try { |
||
57 | foreach ($data as $value) { |
||
58 | $objects[] = $this->item->from([$this->key => $value]); |
||
59 | } |
||
60 | } catch (Throwable $exception) { |
||
61 | throw RelationMappingFailure::encountered($this, $exception); |
||
62 | } |
||
63 | try { |
||
64 | return $this->collection->from($objects); |
||
65 | } catch (Throwable $exception) { |
||
66 | throw CollectionMappingFailure::encountered($this, $exception); |
||
67 | } |
||
70 |