| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class RecordsInJoin |
||
| 15 | { |
||
| 16 | protected ?ARecord $record = null; |
||
| 17 | protected ?string $parentAlias = null; |
||
| 18 | protected string $storeKey = ''; |
||
| 19 | protected string $knownAs = ''; |
||
| 20 | |||
| 21 | 89 | public function setData(ARecord $record, string $storeKey, ?string $parentAlias, string $knownAs = ''): self |
|
| 22 | { |
||
| 23 | 89 | $this->record = $record; |
|
| 24 | 89 | $this->parentAlias = $parentAlias; |
|
| 25 | 89 | $this->storeKey = $storeKey; |
|
| 26 | 89 | $this->knownAs = empty($knownAs) ? $storeKey : $knownAs ; |
|
| 27 | 89 | return $this; |
|
| 28 | } |
||
| 29 | |||
| 30 | 22 | public function getRecord(): ?ARecord |
|
| 31 | { |
||
| 32 | 22 | return $this->record; |
|
| 33 | } |
||
| 34 | |||
| 35 | 11 | public function getParentAlias(): ?string |
|
| 36 | { |
||
| 37 | 11 | return $this->parentAlias; |
|
| 38 | } |
||
| 39 | |||
| 40 | 14 | public function getStoreKey(): string |
|
| 41 | { |
||
| 42 | 14 | return $this->storeKey; |
|
| 43 | } |
||
| 44 | |||
| 45 | 4 | public function getKnownAs(): string |
|
| 48 | } |
||
| 49 | } |
||
| 50 |