Total Complexity | 2 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class Item extends \Yiisoft\ActiveRecord\Tests\Stubs\ActiveRecord\Item |
||
13 | { |
||
14 | public function relationQuery(string $name): ActiveQueryInterface |
||
15 | { |
||
16 | return match ($name) { |
||
17 | 'promotions' => $this->hasMany(Promotion::class, ['item_ids' => 'id']), |
||
18 | default => parent::relationQuery($name), |
||
19 | }; |
||
20 | } |
||
21 | |||
22 | /** @return Promotion[] */ |
||
23 | public function getPromotions(): array |
||
26 | } |
||
27 | } |
||
28 |