| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class Beta extends ActiveRecord |
||
| 12 | { |
||
| 13 | protected int $id; |
||
| 14 | protected string $alpha_string_identifier; |
||
| 15 | protected Alpha $alpha; |
||
| 16 | |||
| 17 | public function getTableName(): string |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getId(): int |
||
| 23 | { |
||
| 24 | return $this->id; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getAlphaStringIdentifier(): string |
||
| 30 | } |
||
| 31 | |||
| 32 | public function relationQuery(string $name): ActiveQueryInterface |
||
| 33 | { |
||
| 34 | return match ($name) { |
||
| 35 | 'alpha' => $this->getAlphaQuery(), |
||
| 36 | default => parent::relationQuery($name), |
||
| 37 | }; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getAlpha(): Alpha|null |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getAlphaQuery(): ActiveQuery |
||
| 48 | } |
||
| 49 | } |
||
| 50 |