@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $results = []; |
80 | 80 | |
81 | - for ($i = 0, $count = count($parsed['ORDER']); $i < $count; ++$i) { |
|
81 | + for ($i = 0, $count = count($parsed['ORDER']); $i<$count; ++$i) { |
|
82 | 82 | $orderItem = $parsed['ORDER'][$i]; |
83 | 83 | if ($orderItem['expr_type'] === 'colref') { |
84 | 84 | $parts = $orderItem['no_quotes']['parts']; |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | ]; |
98 | 98 | } else { |
99 | 99 | $position = $orderItem['position']; |
100 | - if ($i + 1 < $count) { |
|
101 | - $nextPosition = $parsed['ORDER'][$i + 1]['position']; |
|
102 | - $str = substr($sql, $position, $nextPosition - $position); |
|
100 | + if ($i+1<$count) { |
|
101 | + $nextPosition = $parsed['ORDER'][$i+1]['position']; |
|
102 | + $str = substr($sql, $position, $nextPosition-$position); |
|
103 | 103 | } else { |
104 | 104 | $str = substr($sql, $position); |
105 | 105 | } |