Total Complexity | 9 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class EntryAdapter extends AEntryAdapter |
||
16 | { |
||
17 | 1 | public function setFatherId(?int $fatherId): ?bool |
|
18 | { |
||
19 | 1 | if ($this->getLoadedRecord()->fatherId != $fatherId) { |
|
|
|||
20 | 1 | $this->getLoadedRecord()->fatherId = $fatherId; |
|
21 | 1 | return true; |
|
22 | } |
||
23 | 1 | return null; |
|
24 | } |
||
25 | |||
26 | 1 | public function getFatherId(): ?int |
|
27 | { |
||
28 | 1 | $data = $this->getLoadedRecord()->fatherId; |
|
29 | 1 | return !is_null($data) ? intval($data) : null; |
|
30 | } |
||
31 | |||
32 | 1 | public function setMotherId(?int $motherId): ?bool |
|
33 | { |
||
34 | 1 | if ($this->getLoadedRecord()->motherId != $motherId) { |
|
35 | 1 | $this->getLoadedRecord()->motherId = $motherId; |
|
36 | 1 | return true; |
|
37 | } |
||
38 | 1 | return null; |
|
39 | } |
||
40 | |||
41 | 1 | public function getMotherId(): ?int |
|
42 | { |
||
43 | 1 | $data = $this->getLoadedRecord()->motherId; |
|
44 | 1 | return !is_null($data) ? intval($data) : null; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @throws PedigreeException |
||
49 | * @return PedigreeRecord |
||
50 | */ |
||
51 | 5 | public function getLoadedRecord(): APedigreeRecord |
|
54 | } |
||
55 | } |
||
56 |