Completed
Pull Request — 4.1 (#107)
by David
03:26
created
src/Mouf/Database/TDBM/OrderByAnalyzer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         $results = [];
75 75
 
76
-        for ($i = 0, $count = count($parsed['ORDER']); $i < $count; $i++) {
76
+        for ($i = 0, $count = count($parsed['ORDER']); $i<$count; $i++) {
77 77
             $orderItem = $parsed['ORDER'][$i];
78 78
             if ($orderItem['expr_type'] === 'colref') {
79 79
                 $parts = $orderItem['no_quotes']['parts'];
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
                 ];
93 93
             } else {
94 94
                 $position = $orderItem['position'];
95
-                if ($i+1 < $count) {
95
+                if ($i+1<$count) {
96 96
                     $nextPosition = $parsed['ORDER'][$i+1]['position'];
97
-                    $str = substr($sql, $position, $nextPosition - $position);
97
+                    $str = substr($sql, $position, $nextPosition-$position);
98 98
                 } else {
99 99
                     $str = substr($sql, $position);
100 100
                 }
Please login to merge, or discard this patch.