Passed
Branchmaster (2c7806)
by Plamen
02:54
created
tfoot.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,12 +38,11 @@  discard block
 block discarded – undo
38 38
             $q = 'SELECT COUNT(*) FROM (' . self::$t['qAll'] . ') AS dt';
39 39
             self::$t['rows'] = self::select($q);
40 40
         }
41
-        self::$t['pages'] = ceil(self::$t['rows'] / self::$t['paging']);
41
+        self::$t['pages'] = ceil(self::$t['rows']/self::$t['paging']);
42 42
 
43
-        $v['from'] = ($pageNo - 1) * self::$t['paging'] + 1;
44
-        $v['upto'] = ($pageNo * self::$t['paging'] < self::$t['rows']) ?
45
-                $pageNo * self::$t['paging'] :
46
-                self::$t['rows'];
43
+        $v['from'] = ($pageNo - 1)*self::$t['paging'] + 1;
44
+        $v['upto'] = ($pageNo*self::$t['paging'] < self::$t['rows']) ?
45
+                $pageNo*self::$t['paging'] : self::$t['rows'];
47 46
 
48 47
         $v["total"] = self::$t['rows'];
49 48
         $v["items"] = self::$t['items'];
@@ -69,9 +68,8 @@  discard block
 block discarded – undo
69 68
             $select = static::$select;
70 69
             $res = $select($expression, $bindings);
71 70
             //if result is single cell value ($res[0]->value), return the value
72
-            return (count($res) === 1 && count((array) $res[0]) === 1) ?
73
-                    reset($res[0]) :
74
-                    $res;
71
+            return (count($res) === 1 && count((array)$res[0]) === 1) ?
72
+                    reset($res[0]) : $res;
75 73
         } else {
76 74
             throw new Exception('ERROR: table::$select is not a closure. ');
77 75
         }
Please login to merge, or discard this patch.