1 | <?php |
||
9 | class AllowedSort |
||
10 | { |
||
11 | /** @var string */ |
||
12 | protected $sortClass; |
||
13 | |||
14 | /** @var \Spatie\QueryBuilder\Sorts\Sort */ |
||
15 | protected $name; |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $defaultDirection; |
||
19 | |||
20 | /** @var string */ |
||
21 | protected $internalName; |
||
22 | |||
23 | public function __construct(string $name, Sort $sortClass, ?string $internalName = null) |
||
33 | |||
34 | public static function parseSortDirection(string $name): string |
||
38 | |||
39 | public function sort(QueryBuilder $query, ?bool $descending = null): void |
||
45 | |||
46 | public static function field(string $name, ?string $internalName = null) : self |
||
50 | |||
51 | public static function custom(string $name, Sort $sortClass, ?string $internalName = null) : self |
||
55 | |||
56 | public function getName(): string |
||
60 | |||
61 | public function isSort(string $sortName): bool |
||
65 | |||
66 | public function getInternalName(): string |
||
70 | } |
||
71 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..