Passed
Push — master ( c3b9b9...2d5ec3 )
by Stiofan
12:21 queued 06:01
created
includes/wpinv-user-functions.php 1 patch
Braces   +13 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // Exit if accessed directly
3
-if ( ! defined( 'ABSPATH' ) ) exit;
3
+if ( ! defined( 'ABSPATH' ) ) {
4
+    exit;
5
+}
4 6
 
5 7
 function wpinv_user_invoices( $current_page = 1 ) {    
6 8
     global $current_page;
@@ -17,12 +19,13 @@  discard block
 block discarded – undo
17 19
     }
18 20
 
19 21
     if ( $pagination ) {
20
-        if ( get_query_var( 'paged' ) )
21
-            $paged = get_query_var('paged');
22
-        else if ( get_query_var( 'page' ) )
23
-            $paged = get_query_var( 'page' );
24
-        else
25
-            $paged = 1;
22
+        if ( get_query_var( 'paged' ) ) {
23
+                    $paged = get_query_var('paged');
24
+        } else if ( get_query_var( 'page' ) ) {
25
+                    $paged = get_query_var( 'page' );
26
+        } else {
27
+                    $paged = 1;
28
+        }
26 29
     }
27 30
 
28 31
     $args = array(
@@ -37,8 +40,9 @@  discard block
 block discarded – undo
37 40
     $invoices = get_posts( $args );
38 41
 
39 42
     // No invoices
40
-    if ( ! $invoices )
41
-        return false;
43
+    if ( ! $invoices ) {
44
+            return false;
45
+    }
42 46
 
43 47
     return $invoices;
44 48
 }
Please login to merge, or discard this patch.