Completed
Push — master ( f57390...3495f4 )
by Stiofan
12s
created
includes/class-wpinv-shortcodes.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -21,6 +21,9 @@
 block discarded – undo
21 21
         add_shortcode( 'wpinv_messages', __CLASS__ . '::messages' );
22 22
     }
23 23
 
24
+    /**
25
+     * @param string[] $function
26
+     */
24 27
     public static function shortcode_wrapper(
25 28
         $function,
26 29
         $atts    = array(),
Please login to merge, or discard this patch.
includes/wpinv-template-functions.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -140,6 +140,9 @@  discard block
 block discarded – undo
140 140
 	do_action( 'wpinv_after_template_part', $template_name, $template_path, $located, $args );
141 141
 }
142 142
 
143
+/**
144
+ * @param string $template_name
145
+ */
143 146
 function wpinv_get_template_html( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
144 147
 	ob_start();
145 148
 	wpinv_get_template( $template_name, $args, $template_path, $default_path );
@@ -172,6 +175,9 @@  discard block
 block discarded – undo
172 175
     return apply_filters( 'wpinv_locate_template', $template, $template_name, $template_path );
173 176
 }
174 177
 
178
+/**
179
+ * @param string $slug
180
+ */
175 181
 function wpinv_get_template_part( $slug, $name = null, $load = true ) {
176 182
 	do_action( 'get_template_part_' . $slug, $slug, $name );
177 183
 
@@ -871,6 +877,9 @@  discard block
 block discarded – undo
871 877
     return apply_filters( 'wpinv_get_watermark', $output, $id );
872 878
 }
873 879
 
880
+/**
881
+ * @param integer $id
882
+ */
874 883
 function wpinv_get_watermark( $id ) {
875 884
     if ( !$id > 0 ) {
876 885
         return NULL;
Please login to merge, or discard this patch.
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_get_users_invoices( $user = 0, $number = 20, $pagination = false, $status = 'publish' ) {
6 8
     if ( empty( $user ) ) {
@@ -12,12 +14,13 @@  discard block
 block discarded – undo
12 14
     }
13 15
 
14 16
     if ( $pagination ) {
15
-        if ( get_query_var( 'paged' ) )
16
-            $paged = get_query_var('paged');
17
-        else if ( get_query_var( 'page' ) )
18
-            $paged = get_query_var( 'page' );
19
-        else
20
-            $paged = 1;
17
+        if ( get_query_var( 'paged' ) ) {
18
+                    $paged = get_query_var('paged');
19
+        } else if ( get_query_var( 'page' ) ) {
20
+                    $paged = get_query_var( 'page' );
21
+        } else {
22
+                    $paged = 1;
23
+        }
21 24
     }
22 25
 
23 26
     $args = array(
@@ -32,8 +35,9 @@  discard block
 block discarded – undo
32 35
     $invoices = get_posts( $args );
33 36
 
34 37
     // No invoices
35
-    if ( ! $invoices )
36
-        return false;
38
+    if ( ! $invoices ) {
39
+            return false;
40
+    }
37 41
 
38 42
     return $invoices;
39 43
 }
Please login to merge, or discard this patch.