Completed
Push — master ( 187043...48cde4 )
by
unknown
01:30
created

src/Sorts/SortsField.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Spatie\QueryBuilder\Sorts;
4
5
use Illuminate\Database\Eloquent\Builder;
6
7
class SortsField implements Sort
8
{
9
    public function __invoke(Builder $query, bool $descending, string $property)
10
    {
11
        $query->orderBy($property, $descending ? 'desc' : 'asc');
0 ignored issues
show
The method orderBy() does not exist on Illuminate\Database\Eloquent\Builder. Did you maybe mean enforceOrderBy()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
12
    }
13
}
14