| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 10 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 38 | public function apply(Builder $builder, Model $model) | ||
| 39 |     { | ||
| 40 | $start = $this->start; | ||
| 41 | $end = $this->end; | ||
| 42 | $builder | ||
| 43 |             ->when(! is_null($start), function ($query) use ($start, $model) { | ||
| 44 | return $query->where($model->getKeyName(), '>', $start); | ||
| 45 | }) | ||
| 46 |             ->when(! is_null($end), function ($query) use ($end, $model) { | ||
| 47 | return $query->where($model->getKeyName(), '<=', $end); | ||
| 48 | }); | ||
| 56 |