Merge pull request #4238 from tivnet/master

PhpDocs
This commit is contained in:
Coen Jacobs 2013-11-28 05:04:52 -08:00
commit d9039672bc
7 changed files with 18 additions and 14 deletions

View File

@ -167,8 +167,8 @@ abstract class WC_Email extends WC_Settings_API {
* handle_multipart function.
*
* @access public
* @param mixed $mailer
* @return void
* @param PHPMailer $mailer
* @return PHPMailer
*/
function handle_multipart( $mailer ) {
@ -256,7 +256,7 @@ abstract class WC_Email extends WC_Settings_API {
* get_content_type function.
*
* @access public
* @return void
* @return string
*/
function get_content_type() {
switch ( $this->get_email_type() ) {

View File

@ -10,13 +10,13 @@
*/
abstract class WC_Session {
/** customer_id */
/** @var int $_customer_id */
protected $_customer_id;
/** _data */
/** @var array $_data */
protected $_data = array();
/** When something changes */
/** @var bool $_dirty When something changes */
protected $_dirty = false;
/**
@ -94,7 +94,7 @@ abstract class WC_Session {
* get_customer_id function.
*
* @access public
* @return void
* @return int
*/
public function get_customer_id() {
return $this->_customer_id;

View File

@ -156,7 +156,8 @@ abstract class WC_Shipping_Method extends WC_Settings_API {
* has_settings function.
*
* @access public
* @return void
* @return bool
* @todo Must return false if does not
*/
function has_settings() {
if ( $this->has_settings )
@ -170,6 +171,7 @@ abstract class WC_Shipping_Method extends WC_Settings_API {
* @return bool
*/
public function is_available( $package ) {
/** @todo Delete this */
global $woocommerce;
if ( $this->enabled == "no" )

View File

@ -262,6 +262,7 @@ class WC_Admin_Assets {
*/
public function product_taxonomy_styles() {
/** @todo This should be just 'return', without false */
if ( ! current_user_can( 'manage_woocommerce' ) ) return false;
?>
<style type="text/css">

View File

@ -497,7 +497,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
*
* @access public
* @param mixed $key
* @return void
* @return bool
*/
function validate_additional_costs_table_field( $key ) {
return false;
@ -507,7 +507,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
* generate_additional_costs_html function.
*
* @access public
* @return void
* @return string
*/
function generate_additional_costs_table_html() {
ob_start();
@ -663,8 +663,8 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
* save_default_costs function.
*
* @access public
* @param mixed $values
* @return void
* @param array $fields
* @return array
*/
function save_default_costs( $fields ) {
$default_cost = ( $_POST['default_cost'] === '' ) ? '' : wc_format_decimal( $_POST['default_cost'] );

View File

@ -54,9 +54,9 @@ function woocommerce_format_total( $number ) {
* Get product name with extra details such as SKU price and attributes. Used within admin.
*
* @access public
* @param mixed $product
* @param WC_Product $product
* @deprecated 2.1
* @return void
* @return string
*/
function woocommerce_get_formatted_product_name( $product ) {
_deprecated_function( __FUNCTION__, '2.1', 'WC_Product::get_formatted_name()' );

View File

@ -49,6 +49,7 @@ class WC_Widget_Layered_Nav extends WC_Widget {
*/
public function form( $instance ) {
$this->init_settings();
/** @todo This must be only call to parent, with no return. It's a void function */
return parent::form( $instance );
}