| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function load( |
||
| 33 | KnowsWhereToLook $from, |
||
| 34 | array $data, |
||
| 35 | KnowsWhereToLookTo $to, |
||
| 36 | ContainsResultingObjects $objects |
||
| 37 | ): array { |
||
| 38 | // @todo add caching? |
||
| 39 | $relations = []; |
||
| 40 | foreach ($data as $relation) { |
||
| 41 | $relations[ |
||
| 42 | $from->this($relation) |
||
| 43 | ] = $objects[$to->label()][$to->this($relation)]; |
||
| 44 | } |
||
| 45 | return [$this->property => $relations]; |
||
| 46 | } |
||
| 48 |