vaened /
laravel-searcher
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Created by enea dhack - 19/06/2020 21:33. |
||
| 4 | */ |
||
| 5 | |||
| 6 | namespace Vaened\Searcher\Constraints; |
||
| 7 | |||
| 8 | use Illuminate\Database\Eloquent\Builder; |
||
| 9 | use Vaened\Searcher\Constraint; |
||
| 10 | |||
| 11 | class Limit implements Constraint |
||
| 12 | { |
||
| 13 | private int $limit; |
||
| 14 | |||
| 15 | public function __construct(int $limit) |
||
| 16 | { |
||
| 17 | $this->limit = $limit; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function condition(Builder $builder): Builder |
||
| 21 | { |
||
| 22 | return $builder->limit($this->limit); |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 23 | } |
||
| 24 | } |
||
| 25 |