Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function followFor(string $property): MapsProperty |
||
20 | { |
||
21 | if ($this->shouldNest) { |
||
22 | return $this->addConstraintTo( |
||
23 | HasOneNested::inPropertyWithDifferentKey( |
||
24 | $property, |
||
25 | $this->keyOr($property), |
||
26 | $this->hydrator() |
||
27 | ) |
||
28 | ); |
||
29 | } |
||
30 | return $this->addConstraintTo(HasOneEmbedded::inProperty( |
||
31 | $property, |
||
32 | $this->hydrator() |
||
33 | )); |
||
36 |