| Conditions | 3 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 61 | public function resolve() |
||
| 62 | { |
||
| 63 | return array_reduce(explode('.', $this->path), function ($resolved, $relation) { |
||
| 64 | if (is_null($resolved) || in_array($relation, $this->record->getHidden())) { |
||
| 65 | throw new InvalidRelationPathException($this->path); |
||
| 66 | } |
||
| 67 | |||
| 68 | return $resolved->{$relation}; |
||
| 69 | }, $this->record); |
||
| 70 | } |
||
| 71 | } |
||
| 72 |