Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | #[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor] |
||
16 | final class Embedded extends Relation |
||
17 | { |
||
18 | protected const TYPE = 'embedded'; |
||
19 | |||
20 | /** |
||
21 | * @param non-empty-string $target Entity to embed. |
||
|
|||
22 | * @param non-empty-string $load Relation load approach. |
||
23 | */ |
||
24 | 24 | public function __construct( |
|
25 | string $target, |
||
26 | #[ExpectedValues(values: ['lazy', 'eager'])] |
||
27 | string $load = 'eager' |
||
28 | ) { |
||
29 | 24 | parent::__construct($target, $load); |
|
30 | 24 | } |
|
31 | |||
32 | 24 | public function getInverse(): ?Inverse |
|
35 | } |
||
36 | } |
||
37 |