Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | #[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor] |
||
16 | final class Embeddable |
||
17 | { |
||
18 | /** |
||
19 | * @param non-empty-string|null $role Entity role. Defaults to the lowercase class name without a namespace. |
||
|
|||
20 | * @param class-string|null $mapper Mapper class name. Defaults to {@see \Cycle\ORM\Mapper\Mapper}. |
||
21 | * @param string $columnPrefix Custom prefix for embeddable entity columns. |
||
22 | * @param Column[] $columns Embedded entity columns. |
||
23 | */ |
||
24 | 72 | public function __construct( |
|
25 | private ?string $role = null, |
||
26 | private ?string $mapper = null, |
||
27 | private string $columnPrefix = '', |
||
28 | private array $columns = [], |
||
29 | ) { |
||
30 | 72 | } |
|
31 | |||
32 | 72 | public function getRole(): ?string |
|
33 | { |
||
34 | 72 | return $this->role; |
|
35 | } |
||
36 | |||
37 | 72 | public function getMapper(): ?string |
|
38 | { |
||
39 | 72 | return $this->mapper; |
|
40 | } |
||
41 | |||
42 | 72 | public function getColumnPrefix(): string |
|
45 | } |
||
46 | |||
47 | public function getColumns(): array |
||
50 | } |
||
51 | } |
||
52 |