Passed
Push — dev ( 2552ea...5add0a )
by Plamen
07:40
created
TraitPaging.php 1 patch
Spacing   +11 added lines, -13 removed lines patch added patch discarded remove patch
@@ -14,13 +14,12 @@  discard block
 block discarded – undo
14 14
 
15 15
             $limit = 10;
16 16
 
17
-            $vars['start'] = $vars['page'] > ($limit / 2) ?
18
-                ($vars['page'] - $limit / 2) :
19
-                1;
17
+            $vars['start'] = $vars['page'] > ($limit/2) ?
18
+                ($vars['page'] - $limit/2) : 1;
20 19
 
21
-            if ($vars['page'] > ($vars['pages'] - ($limit / 2))) {
20
+            if ($vars['page'] > ($vars['pages'] - ($limit/2))) {
22 21
                 $vars['final'] = $vars['pages'];
23
-            } elseif ($vars['page'] > ($limit / 2)) {
22
+            } elseif ($vars['page'] > ($limit/2)) {
24 23
                 $vars['final'] = $vars['start'] + $limit;
25 24
             } else {
26 25
                 $vars['final'] = $limit;
@@ -43,16 +42,15 @@  discard block
 block discarded – undo
43 42
         }
44 43
 
45 44
         $jump = self::jump($multiplier, $direction);
46
-        $add = '<li class="jump"><a>'.$jump.'</a></li>';
45
+        $add = '<li class="jump"><a>' . $jump . '</a></li>';
47 46
 
48 47
         $jumpExists = $direction === '-' ?
49
-            (self::$t['page'] - $multiplier) > 0 :
50
-            (self::$t['page'] + $multiplier) <= self::$t['pages'];
48
+            (self::$t['page'] - $multiplier) > 0 : (self::$t['page'] + $multiplier) <= self::$t['pages'];
51 49
 
52 50
         if ($jumpExists) {
53
-            $html = $direction === '-' ? $add.$html : $html.$add;
51
+            $html = $direction === '-' ? $add . $html : $html . $add;
54 52
 
55
-            return self::jumps($html, ($multiplier * 10));
53
+            return self::jumps($html, ($multiplier*10));
56 54
         }
57 55
 
58 56
         return $html;
@@ -61,11 +59,11 @@  discard block
 block discarded – undo
61 59
     private static function jump($multiplier, $direction)
62 60
     {
63 61
         if ($multiplier >= 1000000) {
64
-            return $direction.($multiplier / 1000000).'M';
62
+            return $direction . ($multiplier/1000000) . 'M';
65 63
         } elseif ($multiplier >= 1000) {
66
-            return $direction.($multiplier / 1000).'K';
64
+            return $direction . ($multiplier/1000) . 'K';
67 65
         } else {
68
-            return $direction.$multiplier;
66
+            return $direction . $multiplier;
69 67
         }
70 68
     }
71 69
 }
Please login to merge, or discard this patch.