Skip to content

Commit ff9462f

Browse files
committed
Cleaner substring syntax
1 parent b63ba9d commit ff9462f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Handler/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private function parseSort(string $string): array
236236
$fields = explode(',', $string);
237237

238238
foreach ($fields as $field) {
239-
if (substr($field, 0, 1) === '-') {
239+
if ($field[0] === '-') {
240240
$field = substr($field, 1);
241241
$direction = 'desc';
242242
} else {

0 commit comments

Comments
 (0)