Passed
Pull Request — master (#47)
by Kiran
04:02
created
includes/admin/class-wpinv-recurring-admin.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * Load frontend styles
60 60
      *
61 61
      * @since  1.0.0
62
-     * @return bool
62
+     * @return boolean|null
63 63
      */
64 64
     public function enqueue_styles() {
65 65
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * Load frontend javascript files
69 69
      *
70 70
      * @since  1.0.0
71
-     * @return bool
71
+     * @return boolean|null
72 72
      */
73 73
     public function enqueue_scripts() {
74 74
     }
Please login to merge, or discard this patch.
includes/class-wpinv-api.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -47,6 +47,9 @@  discard block
 block discarded – undo
47 47
         }
48 48
     }
49 49
     
50
+    /**
51
+     * @param integer $code
52
+     */
50 53
     public function send_status( $code ) {
51 54
         status_header( $code );
52 55
     }
@@ -195,6 +198,11 @@  discard block
 block discarded – undo
195 198
 class WPInv_API_Exception extends Exception {
196 199
     protected $error_code;
197 200
 
201
+    /**
202
+     * @param string $error_code
203
+     * @param string $error_message
204
+     * @param integer $http_status_code
205
+     */
198 206
     public function __construct( $error_code, $error_message, $http_status_code ) {
199 207
         $this->error_code = $error_code;
200 208
         parent::__construct( $error_message, $http_status_code );
Please login to merge, or discard this patch.
includes/class-wpinv-invoice.php 1 patch
Doc Comments   +36 added lines patch added patch discarded remove patch
@@ -83,6 +83,9 @@  discard block
 block discarded – undo
83 83
         return $value;
84 84
     }
85 85
 
86
+    /**
87
+     * @param string $key
88
+     */
86 89
     public function set( $key, $value ) {
87 90
         $ignore = array( 'items', 'cart_details', 'fees', '_ID' );
88 91
 
@@ -916,6 +919,9 @@  discard block
 block discarded – undo
916 919
         return $removed;
917 920
     }
918 921
 
922
+    /**
923
+     * @param string $key
924
+     */
919 925
     public function remove_fee_by( $key, $value, $global = false ) {
920 926
         $allowed_fee_keys = apply_filters( 'wpinv_fee_keys', array(
921 927
             'index', 'label', 'amount', 'type',
@@ -1375,6 +1381,9 @@  discard block
 block discarded – undo
1375 1381
         return apply_filters( 'wpinv_get_invoice_final_total', $final_total, $this, $currency );
1376 1382
     }
1377 1383
     
1384
+    /**
1385
+     * @return boolean
1386
+     */
1378 1387
     public function get_discounts( $array = false ) {
1379 1388
         $discounts = $this->discounts;
1380 1389
         if ( $array && $discounts ) {
@@ -1383,6 +1392,9 @@  discard block
 block discarded – undo
1383 1392
         return apply_filters( 'wpinv_payment_discounts', $discounts, $this->ID, $this, $array );
1384 1393
     }
1385 1394
     
1395
+    /**
1396
+     * @return string
1397
+     */
1386 1398
     public function get_discount( $currency = false, $dash = false ) {
1387 1399
         if ( !empty( $this->discounts ) ) {
1388 1400
             global $ajax_cart_details;
@@ -1479,10 +1491,16 @@  discard block
 block discarded – undo
1479 1491
         return apply_filters( 'wpinv_user_full_name', $this->full_name, $this->ID, $this );
1480 1492
     }
1481 1493
     
1494
+    /**
1495
+     * @return string
1496
+     */
1482 1497
     public function get_user_info() {
1483 1498
         return apply_filters( 'wpinv_user_info', $this->user_info, $this->ID, $this );
1484 1499
     }
1485 1500
     
1501
+    /**
1502
+     * @return string
1503
+     */
1486 1504
     public function get_email() {
1487 1505
         return apply_filters( 'wpinv_user_email', $this->email, $this->ID, $this );
1488 1506
     }
@@ -1525,10 +1543,16 @@  discard block
 block discarded – undo
1525 1543
         return apply_filters( 'wpinv_currency_code', $this->currency, $this->ID, $this );
1526 1544
     }
1527 1545
     
1546
+    /**
1547
+     * @return string
1548
+     */
1528 1549
     public function get_created_date() {
1529 1550
         return apply_filters( 'wpinv_created_date', $this->date, $this->ID, $this );
1530 1551
     }
1531 1552
     
1553
+    /**
1554
+     * @return string
1555
+     */
1532 1556
     public function get_due_date( $display = false ) {
1533 1557
         $due_date = apply_filters( 'wpinv_due_date', $this->due_date, $this->ID, $this );
1534 1558
         
@@ -2081,6 +2105,9 @@  discard block
 block discarded – undo
2081 2105
         return apply_filters( 'wpinv_invoice_get_subscription_name', $name, $this );
2082 2106
     }
2083 2107
         
2108
+    /**
2109
+     * @return string
2110
+     */
2084 2111
     public function get_expiration() {
2085 2112
         $expiration = $this->get_meta( '_wpinv_subscr_expiration', true );
2086 2113
         return $expiration;
@@ -2096,6 +2123,9 @@  discard block
 block discarded – undo
2096 2123
         return $cancelled_date;
2097 2124
     }
2098 2125
     
2126
+    /**
2127
+     * @return string
2128
+     */
2099 2129
     public function get_trial_end_date( $formatted = true ) {
2100 2130
         if ( !$this->is_free_trial() || !$this->is_paid() ) {
2101 2131
             return NULL;
@@ -2117,6 +2147,9 @@  discard block
 block discarded – undo
2117 2147
         return $trial_end_date;
2118 2148
     }
2119 2149
     
2150
+    /**
2151
+     * @return string
2152
+     */
2120 2153
     public function get_subscription_created( $default = true ) {
2121 2154
         $created = $this->get_meta( '_wpinv_subscr_created', true );
2122 2155
         
@@ -2126,6 +2159,9 @@  discard block
 block discarded – undo
2126 2159
         return $created;
2127 2160
     }
2128 2161
     
2162
+    /**
2163
+     * @return string
2164
+     */
2129 2165
     public function get_subscription_start( $formatted = true ) {
2130 2166
         if ( !$this->is_paid() ) {
2131 2167
             return '-';
Please login to merge, or discard this patch.
includes/wpinv-gd-functions.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -740,6 +740,9 @@
 block discarded – undo
740 740
 add_action( 'geodir_dashboard_links', 'wpinv_gdp_dashboard_invoice_history_link' );
741 741
 remove_action( 'geodir_dashboard_links', 'geodir_payment_invoices_list_page_link' );
742 742
 
743
+/**
744
+ * @param string $new_status
745
+ */
743 746
 function wpinv_wpi_to_gdp_update_status( $invoice_id, $new_status, $old_status ) {
744 747
     if (!defined('GEODIRPAYMENT_VERSION')) {
745 748
         return false;
Please login to merge, or discard this patch.
includes/wpinv-helper-functions.php 1 patch
Doc Comments   +31 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,6 +31,9 @@  discard block
 block discarded – undo
31 31
     return apply_filters( 'wpinv_get_ip', $ip );
32 32
 }
33 33
 
34
+/**
35
+ * @return string
36
+ */
34 37
 function wpinv_get_user_agent() {
35 38
     if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
36 39
         $user_agent = sanitize_text_field( $_SERVER['HTTP_USER_AGENT'] );
@@ -41,6 +44,9 @@  discard block
 block discarded – undo
41 44
     return apply_filters( 'wpinv_get_user_agent', $user_agent );
42 45
 }
43 46
 
47
+/**
48
+ * @param integer $decimals
49
+ */
44 50
 function wpinv_sanitize_amount( $amount, $decimals = NULL ) {
45 51
     $is_negative   = false;
46 52
     $thousands_sep = wpinv_thousands_separator();
@@ -79,6 +85,9 @@  discard block
 block discarded – undo
79 85
 }
80 86
 add_filter( 'wpinv_sanitize_amount_decimals', 'wpinv_currency_decimal_filter', 10, 1 );
81 87
 
88
+/**
89
+ * @param integer $decimals
90
+ */
82 91
 function wpinv_round_amount( $amount, $decimals = NULL ) {
83 92
     if ( $decimals === NULL ) {
84 93
         $decimals = wpinv_decimals();
@@ -115,6 +124,9 @@  discard block
 block discarded – undo
115 124
     return $status;
116 125
 }
117 126
 
127
+/**
128
+ * @return string
129
+ */
118 130
 function wpinv_get_currency() {
119 131
     $currency = wpinv_get_option( 'currency', 'USD' );
120 132
     
@@ -185,6 +197,9 @@  discard block
 block discarded – undo
185 197
     return apply_filters( 'wpinv_currency_symbol', $currency_symbol, $currency );
186 198
 }
187 199
 
200
+/**
201
+ * @return string
202
+ */
188 203
 function wpinv_currency_position() {
189 204
     $position = wpinv_get_option( 'currency_position', 'left' );
190 205
     
@@ -313,6 +328,9 @@  discard block
 block discarded – undo
313 328
     return $price;
314 329
 }
315 330
 
331
+/**
332
+ * @return string
333
+ */
316 334
 function wpinv_format_amount( $amount, $decimals = NULL, $calculate = false ) {
317 335
     $thousands_sep = wpinv_thousands_separator();
318 336
     $decimal_sep   = wpinv_decimal_separator();
@@ -363,6 +381,9 @@  discard block
 block discarded – undo
363 381
     return apply_filters( 'wpinv_sanitize_key', $key, $raw_key );
364 382
 }
365 383
 
384
+/**
385
+ * @return string
386
+ */
366 387
 function wpinv_get_file_extension( $str ) {
367 388
     $parts = explode( '.', $str );
368 389
     return end( $parts );
@@ -567,6 +588,9 @@  discard block
 block discarded – undo
567 588
     return strlen( $str );
568 589
 }
569 590
 
591
+/**
592
+ * @param string $str
593
+ */
570 594
 function wpinv_utf8_strtolower( $str, $encoding = 'UTF-8' ) {
571 595
     if ( function_exists( 'mb_strtolower' ) ) {
572 596
         return mb_strtolower( $str, $encoding );
@@ -575,6 +599,9 @@  discard block
 block discarded – undo
575 599
     return strtolower( $str );
576 600
 }
577 601
 
602
+/**
603
+ * @param string $str
604
+ */
578 605
 function wpinv_utf8_strtoupper( $str, $encoding = 'UTF-8' ) {
579 606
     if ( function_exists( 'mb_strtoupper' ) ) {
580 607
         return mb_strtoupper( $str, $encoding );
@@ -652,7 +679,7 @@  discard block
 block discarded – undo
652 679
  *
653 680
  * @param string $str The string being decoded.
654 681
  * @param string $encoding The encoding parameter is the character encoding. Default "UTF-8".
655
- * @return string The width of string.
682
+ * @return integer The width of string.
656 683
  */
657 684
 function wpinv_utf8_strwidth( $str, $encoding = 'UTF-8' ) {
658 685
     if ( function_exists( 'mb_strwidth' ) ) {
@@ -662,6 +689,9 @@  discard block
 block discarded – undo
662 689
     return wpinv_utf8_strlen( $str, $encoding );
663 690
 }
664 691
 
692
+/**
693
+ * @param string $str
694
+ */
665 695
 function wpinv_utf8_ucfirst( $str, $lower_str_end = false, $encoding = 'UTF-8' ) {
666 696
     if ( function_exists( 'mb_strlen' ) ) {
667 697
         $first_letter = wpinv_utf8_strtoupper( wpinv_utf8_substr( $str, 0, 1, $encoding ), $encoding );
Please login to merge, or discard this patch.
includes/wpinv-invoice-functions.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -300,6 +300,9 @@  discard block
 block discarded – undo
300 300
     return $invoice->get_gateway_title();
301 301
 }
302 302
 
303
+/**
304
+ * @return string
305
+ */
303 306
 function wpinv_get_payment_transaction_id( $invoice_id ) {
304 307
     $invoice = new WPInv_Invoice( $invoice_id );
305 308
     
@@ -404,6 +407,9 @@  discard block
 block discarded – undo
404 407
     return $date_created;
405 408
 }
406 409
 
410
+/**
411
+ * @return string
412
+ */
407 413
 function wpinv_get_invoice_date( $invoice_id = 0, $format = '' ) {
408 414
     $invoice = new WPInv_Invoice( $invoice_id );
409 415
     
@@ -1605,6 +1611,9 @@  discard block
 block discarded – undo
1605 1611
     return $display;
1606 1612
 }
1607 1613
 
1614
+/**
1615
+ * @return integer
1616
+ */
1608 1617
 function wpinv_get_invoice_id_by_key( $key ) {
1609 1618
 	global $wpdb;
1610 1619
 
Please login to merge, or discard this patch.