Completed
Push — master ( fa0e3f...25162d )
by Adam
02:16
created
src/Pagination.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,10 +74,8 @@
 block discarded – undo
74 74
             self::$page = (self::$current > $show ? (self::$current - $show) : 1);
75 75
             if (self::$current < (self::$lastpage - $show)) {
76 76
                 self::$lastpage = ((self::$current <= $show) ? (self::$current + ($numpages - self::$current)) : (self::$current + $show));
77
-            }
78
-            else { self::$page = self::$current - ($numpages - ((ceil($records / $maxshown) - self::$current)) - 1); }
79
-        }
80
-        else { self::$page = 1; }
77
+            } else { self::$page = self::$current - ($numpages - ((ceil($records / $maxshown) - self::$current)) - 1); }
78
+        } else { self::$page = 1; }
81 79
     }
82 80
     
83 81
     /**
Please login to merge, or discard this patch.
tests/PaginationTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use Pager\Pagination;
5 5
 use PHPUnit\Framework\TestCase;
6 6
 
7
-class PaginationTest extends TestCase{
7
+class PaginationTest extends TestCase {
8 8
     
9 9
     protected $pagination;
10 10
     
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
         $this->pagination = new Pagination();
13 13
     }
14 14
     
15
-    public function tearDown(){
15
+    public function tearDown() {
16 16
         unset($this->pagination);
17 17
     }
18 18
     
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      * @covers Pager\Pagination::buildLink
22 22
      * @covers Pager\Pagination::getPage
23 23
      */
24
-    public function testCreatePager(){
24
+    public function testCreatePager() {
25 25
         $this->pagination->paging(72, '/test-page');
26 26
     }
27 27
     
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @covers Pager\Pagination::buildLink
31 31
      * @covers Pager\Pagination::getPage
32 32
      */
33
-    public function testNoPagerNeeded(){
33
+    public function testNoPagerNeeded() {
34 34
         
35 35
     }
36 36
     
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @covers Pager\Pagination::preLinks
42 42
      * @covers Pager\Pagination::postLinks
43 43
      */
44
-    public function testPagerWithArrows(){
44
+    public function testPagerWithArrows() {
45 45
         
46 46
     }
47 47
     
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @covers Pager\Pagination::preLinks
53 53
      * @covers Pager\Pagination::postLinks
54 54
      */
55
-    public function testPagerWithQueryString(){
55
+    public function testPagerWithQueryString() {
56 56
         
57 57
     }
58 58
 }
Please login to merge, or discard this patch.