@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | protected function sort(string $field, string $direction, DoctrineQueryBuilder $queryBuilder): void |
148 | 148 | { |
149 | - if (! isset($this->sortFields[$field])) { |
|
149 | + if (!isset($this->sortFields[$field])) { |
|
150 | 150 | $this->sortFields[$field] = []; |
151 | 151 | } |
152 | 152 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | protected function sortPriority(string $field, int $priority, DoctrineQueryBuilder $queryBuilder): void |
159 | 159 | { |
160 | - if (! isset($this->sortFields[$field])) { |
|
160 | + if (!isset($this->sortFields[$field])) { |
|
161 | 161 | $this->sortFields[$field] = []; |
162 | 162 | } |
163 | 163 | |
@@ -169,12 +169,12 @@ discard block |
||
169 | 169 | protected function applySort(DoctrineQueryBuilder $queryBuilder): void |
170 | 170 | { |
171 | 171 | // If no sort fields were added, do nothing |
172 | - if (! $this->sortFields) { |
|
172 | + if (!$this->sortFields) { |
|
173 | 173 | return; |
174 | 174 | } |
175 | 175 | |
176 | 176 | // Sort fields by priority if set, otherwise by field name |
177 | - uasort($this->sortFields, static function ($a, $b) { |
|
177 | + uasort($this->sortFields, static function($a, $b) { |
|
178 | 178 | if (isset($a['priority']) && isset($b['priority'])) { |
179 | 179 | return $a['priority'] <=> $b['priority']; |
180 | 180 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | foreach ($this->sortFields as $field => $sort) { |
188 | 188 | // If the direction is not set, default to 'ASC' |
189 | - if (! isset($sort['direction'])) { |
|
189 | + if (!isset($sort['direction'])) { |
|
190 | 190 | throw new Error( |
191 | 191 | "Sort direction for field '" |
192 | 192 | . $field |