@@ -78,18 +78,18 @@ |
||
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); |