Total Complexity | 10 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 84.21% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | abstract class AbstractOneRelation extends AbstractRelation implements OneRelationInterface |
||
15 | { |
||
16 | /** |
||
17 | * @return $this |
||
18 | */ |
||
19 | 184 | public function setData(?ItemInterface $data) |
|
20 | { |
||
21 | 184 | $this->data = $data; |
|
22 | |||
23 | 184 | return $this; |
|
24 | } |
||
25 | |||
26 | 12 | public function getData(): ?ItemInterface |
|
27 | { |
||
28 | 12 | return $this->data ?: null; |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return $this |
||
33 | */ |
||
34 | 184 | public function setIncluded(?ItemInterface $included) |
|
35 | { |
||
36 | 184 | $this->included = $included; |
|
37 | |||
38 | 184 | return $this; |
|
39 | } |
||
40 | |||
41 | 148 | public function getIncluded(): ?ItemInterface |
|
42 | { |
||
43 | 148 | return $this->included ?: null; |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return $this |
||
48 | */ |
||
49 | 184 | public function associate(ItemInterface $included) |
|
53 | } |
||
54 | |||
55 | 64 | public function getAssociated(): ?ItemInterface |
|
56 | { |
||
66 | } |
||
67 | } |
||
68 |