1 | <?php |
||
2 | /** |
||
3 | * Created by enea dhack - 19/06/2020 21:09. |
||
4 | */ |
||
5 | |||
6 | namespace Vaened\Searcher\Constraints; |
||
7 | |||
8 | use Illuminate\Database\Eloquent\Builder; |
||
9 | use Vaened\Searcher\Constraint; |
||
10 | use Vaened\Searcher\Keywords\OrderDirection; |
||
0 ignored issues
–
show
|
|||
11 | |||
12 | class OrderBy implements Constraint |
||
13 | { |
||
14 | private string $column; |
||
15 | |||
16 | private ?OrderDirection $direction; |
||
17 | |||
18 | public function __construct(string $column, ?OrderDirection $direction = null) |
||
19 | { |
||
20 | $this->column = $column; |
||
21 | $this->direction = $direction; |
||
22 | } |
||
23 | |||
24 | public function condition(Builder $builder): Builder |
||
25 | { |
||
26 | return $builder->orderBy($this->column, $this->direction ?: OrderDirection::DESC); |
||
0 ignored issues
–
show
|
|||
27 | } |
||
28 | } |
||
29 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths