From ff9462face6993f3baa9bf9d5b5e6d77ad58997b Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 3 Oct 2019 15:41:43 +0930 Subject: [PATCH] Cleaner substring syntax --- src/Handler/Index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Index.php b/src/Handler/Index.php index dbe9adb..1ad6d85 100644 --- a/src/Handler/Index.php +++ b/src/Handler/Index.php @@ -236,7 +236,7 @@ class Index implements RequestHandlerInterface $fields = explode(',', $string); foreach ($fields as $field) { - if (substr($field, 0, 1) === '-') { + if ($field[0] === '-') { $field = substr($field, 1); $direction = 'desc'; } else {