| Conditions | 5 |
| Paths | 9 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | protected function applyFilter($query, $model, $filter) |
||
| 31 | { |
||
| 32 | foreach (['title', 'author', 'summary'] as $name) { |
||
| 33 | if (!empty($model->$name)) { |
||
| 34 | $query->andWhere(['LIKE', 'a.' . $name, $model->$name]); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | foreach (['id', 'status'] as $name) { |
||
| 38 | if (is_numeric($model->$name)) { |
||
| 39 | $query->andWhere(['a.' . $name => $model->$name]); |
||
| 40 | } |
||
| 44 |