Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
27 | 3 | protected static function range($query, $attribute, $start = null, $end = null) |
|
28 | { |
||
29 | 3 | if (!isset($attribute, $start, $end)) { |
|
30 | 3 | throw new \yii\db\Exception("`attribute`, `start` and `end` must be specified."); |
|
31 | 3 | } |
|
32 | return $query->andWhere(['between', $attribute, $start, $end]); |
||
33 | } |
||
34 | |||
41 |