| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 14 | public function getImages() |
||
|
|
|||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var $object \app\models\Object |
||
| 18 | * @var $model \app\properties\HasProperties | \yii\db\ActiveRecord |
||
| 19 | * @return \yii\db\ActiveQueryInterface |
||
| 20 | */ |
||
| 21 | $model = $this; |
||
| 22 | $object = $model->object; |
||
| 23 | return $model->hasMany(Image::className(), ['object_model_id' => 'id'])->andWhere( |
||
| 24 | ['object_id' => $object->id] |
||
| 25 | )->addOrderBy( |
||
| 26 | [ |
||
| 27 | 'sort_order' => SORT_ASC, |
||
| 28 | 'id' => SORT_ASC |
||
| 29 | ] |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | |||
| 34 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.