diff --git a/includes/abstracts/abstract-wc-email.php b/includes/abstracts/abstract-wc-email.php index 197a6371a22..a7b315dc14d 100644 --- a/includes/abstracts/abstract-wc-email.php +++ b/includes/abstracts/abstract-wc-email.php @@ -125,7 +125,6 @@ abstract class WC_Email extends WC_Settings_API { * Constructor * * @access public - * @return void */ function __construct() { @@ -270,11 +269,12 @@ abstract class WC_Email extends WC_Settings_API { } /** - * Proxy to parent's get_option and attempt to localize the result using gettext. - * - * @access public - * @return string - */ + * Proxy to parent's get_option and attempt to localize the result using gettext. + * @access public + * @param string $key + * @param mixed $empty_value + * @return string + */ function get_option( $key, $empty_value = null ) { return __( parent::get_option( $key, $empty_value ) ); } @@ -324,6 +324,7 @@ abstract class WC_Email extends WC_Settings_API { * style_inline_tags function. * * @access public + * @param array $tags * @return array */ function style_inline_tags($tags) { @@ -332,8 +333,8 @@ abstract class WC_Email extends WC_Settings_API { /** * style_inline_h1_tag function. - * * @access public + * @param array $styles * @return array */ function style_inline_h1_tag($styles) { @@ -354,8 +355,8 @@ abstract class WC_Email extends WC_Settings_API { /** * style_inline_h2_tag function. - * * @access public + * @param array $styles * @return array */ function style_inline_h2_tag($styles) { @@ -378,6 +379,7 @@ abstract class WC_Email extends WC_Settings_API { * style_inline_h3_tag function. * * @access public + * @param array $styles * @return array */ function style_inline_h3_tag($styles) { @@ -396,6 +398,10 @@ abstract class WC_Email extends WC_Settings_API { return $styles; } + /** + * @param array $styles + * @return array + */ function style_inline_a_tag($styles) { $styles['color'] = get_option( 'woocommerce_email_text_color' ); $styles['font-weight'] = 'normal'; @@ -408,6 +414,7 @@ abstract class WC_Email extends WC_Settings_API { * style_inline_img_tag function. * * @access public + * @param array $styles * @return array */ function style_inline_img_tag($styles) { @@ -438,6 +445,7 @@ abstract class WC_Email extends WC_Settings_API { * get_style_inline_for_tag function. * * @access public + * @param string $tag * @return string */ function get_style_inline_for_tag($tag) { diff --git a/includes/abstracts/abstract-wc-settings-api.php b/includes/abstracts/abstract-wc-settings-api.php index c5bc9f5be2d..869a2a0710a 100644 --- a/includes/abstracts/abstract-wc-settings-api.php +++ b/includes/abstracts/abstract-wc-settings-api.php @@ -125,7 +125,7 @@ abstract class WC_Settings_API { * Gets and option from the settings API, using defaults if necessary to prevent undefined notices. * * @access public - * @param mixed $key + * @param string $key * @param mixed $empty_value * @return string The value specified for the option or a default value for the option */ diff --git a/includes/admin/post-types/class-wc-admin-cpt-shop_coupon.php b/includes/admin/post-types/class-wc-admin-cpt-shop_coupon.php index 08d13c0424f..f92045f7c20 100644 --- a/includes/admin/post-types/class-wc-admin-cpt-shop_coupon.php +++ b/includes/admin/post-types/class-wc-admin-cpt-shop_coupon.php @@ -55,6 +55,10 @@ class WC_Admin_CPT_Shop_Coupon extends WC_Admin_CPT { return $text; } + /** + * Print coupon description textarea field + * @param WP_Post $post + */ public function coupon_description_field( $post ) { if ( $post->post_type != 'shop_coupon' ) return; diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index ce2a3d37e1b..086067b7747 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -636,6 +636,10 @@ class WC_AJAX { // Now find all combinations and create posts if ( ! function_exists( 'array_cartesian' ) ) { + /** + * @param array $input + * @return array + */ function array_cartesian( $input ) { $result = array(); diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index cb425baeb86..3d4c75eeede 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1622,6 +1622,8 @@ class WC_Cart { /** * Remove a single coupon by code * @param string $coupon_code Code of the coupon to remove + * @return bool + * @todo Should either be void or return true at the end of the function */ public function remove_coupon( $coupon_code ) { // Coupons are globally disabled diff --git a/includes/class-wc-shortcodes.php b/includes/class-wc-shortcodes.php index e450a1b4ff5..0914e09f067 100644 --- a/includes/class-wc-shortcodes.php +++ b/includes/class-wc-shortcodes.php @@ -122,6 +122,7 @@ class WC_Shortcodes { * @access public * @param array $atts * @return string + * @todo Must not return void. Need return ''; */ public static function product_category( $atts ){ global $woocommerce_loop; @@ -331,6 +332,7 @@ class WC_Shortcodes { * @access public * @param array $atts * @return string + * @todo Must not return void. Need return ''; */ public static function products( $atts ) { global $woocommerce_loop; @@ -407,6 +409,7 @@ class WC_Shortcodes { * @access public * @param array $atts * @return string + * @todo Must not return void. Need return ''; */ public static function product( $atts ) { if (empty($atts)) return; @@ -466,6 +469,7 @@ class WC_Shortcodes { * @access public * @param array $atts * @return string + * @todo Must not return void. Need return ''; */ public static function product_add_to_cart( $atts ) { global $wpdb, $post; @@ -518,6 +522,7 @@ class WC_Shortcodes { * @access public * @param array $atts * @return string + * @todo Must not return void. Need return ''; */ public static function product_add_to_cart_url( $atts ) { global $wpdb; @@ -789,6 +794,7 @@ class WC_Shortcodes { * @access public * @param array $atts * @return string + * @todo Must not return void. Need return ''; */ public static function product_page( $atts ) { if ( empty( $atts ) ) return; @@ -839,7 +845,6 @@ class WC_Shortcodes { * Show messages * * @access public - * @param array $atts * @return string */ public static function shop_messages() { @@ -945,6 +950,10 @@ class WC_Shortcodes { return '
' . ob_get_clean() . '
'; } + /** + * @param array $atts + * @return string + */ public static function related_products( $atts ) { $atts = shortcode_atts( array( diff --git a/includes/gateways/mijireh/includes/Address.php b/includes/gateways/mijireh/includes/Address.php index cbcb2639662..db3f5d1927e 100755 --- a/includes/gateways/mijireh/includes/Address.php +++ b/includes/gateways/mijireh/includes/Address.php @@ -23,7 +23,11 @@ class Mijireh_Address extends Mijireh_Model { ); } - public function validate() { + /** + * Check required fields + * @return bool + */ + public function validate() { $is_valid = $this->_check_required_fields(); return $is_valid; } diff --git a/includes/gateways/mijireh/includes/Order.php b/includes/gateways/mijireh/includes/Order.php index bc43f81254f..b2bab2dae16 100755 --- a/includes/gateways/mijireh/includes/Order.php +++ b/includes/gateways/mijireh/includes/Order.php @@ -154,13 +154,17 @@ class Mijireh_Order extends Mijireh_Model { return $data; } - /** - * Add the specified item and price to the order. - * - * Return the total number of items in the order (including the one that was just added) - * - * @return int - */ + /** + * Add the specified item and price to the order. + * Return the total number of items in the order (including the one that was just added) + * + * @param Mijireh_Item|string $name + * @param int $price + * @param int $quantity + * @param string $sku + * @throws Mijireh_Exception + * @return int + */ public function add_item($name, $price=0, $quantity=1, $sku='') { $item = ''; if(is_object($name) && get_class($name) == 'Mijireh_Item') { diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 90caa14fedb..135f98fdc41 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -993,8 +993,8 @@ if ( ! function_exists( 'woocommerce_sort_product_tabs' ) ) { * Sort tabs by priority * * @access public - * @param mixed $tabs - * @return void + * @param array $tabs + * @return array */ function woocommerce_sort_product_tabs( $tabs = array() ) {