Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function byImportAttributes($attributes) |
||
19 | { |
||
20 | return $this |
||
21 | ->with([ |
||
22 | 'aliases' => function ($q) use ($attributes) { |
||
23 | return $q->andWhere($attributes); |
||
24 | }, |
||
25 | ]) |
||
26 | ->andWhere([ |
||
27 | 'OR', |
||
28 | $attributes, |
||
29 | [ |
||
30 | 'id' => BrandsAlias::find()->select('id')->andWhere($attributes), |
||
31 | ] |
||
34 | } |