Passed
Push — master ( f0da68...e92dcd )
by Jason
42:48 queued 27:50
created
src/CollectionExtension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,18 +78,18 @@
 block discarded – undo
78 78
         } else {
79 79
             if (strpos($sort, ',') === false) {
80 80
                 $sortParts = explode(' ', $sort);
81
-                $collection = $context->getResults($searchCriteria)->sort($sortParts[0], $sortParts[1]);
81
+                $collection = $context->getResults($searchCriteria)->sort($sortParts[ 0 ], $sortParts[ 1 ]);
82 82
             } else {
83 83
                 // multiple orders are given
84
-                $sortParts = [];
84
+                $sortParts = [ ];
85 85
                 $sortArgs = explode(',', $sort);
86 86
                 foreach ($sortArgs as $arg) {
87 87
                     $arg = trim($arg);
88 88
                     if (strpos($arg, ' ') === false) {
89
-                        $sortParts[$arg] = 'ASC';
89
+                        $sortParts[ $arg ] = 'ASC';
90 90
                     } else {
91 91
                         $part = explode(' ', $arg);
92
-                        $sortParts[$part[0]] = $part[1];
92
+                        $sortParts[ $part[ 0 ] ] = $part[ 1 ];
93 93
                     }
94 94
                 }
95 95
                 $collection = $context->getResults($searchCriteria)->sort($sortParts);
Please login to merge, or discard this patch.