PhpDocs and TODO comments

This commit is contained in:
Gregory K 2013-11-28 11:49:30 -05:00
parent 4a5c965728
commit cdbe5950f0
7 changed files with 25 additions and 17 deletions

View File

@ -561,6 +561,7 @@ class WC_Admin_Settings {
*
* @access public
* @param array $options Opens array to output
* @return bool
*/
public static function save_fields( $options ) {
if ( empty( $_POST ) )

View File

@ -631,8 +631,9 @@ class WC_Admin_CPT_Product extends WC_Admin_CPT {
* Quick and bulk edit saving
*
* @access public
* @param mixed $post_id
* @param mixed $post
* @param int $post_id
* @param WP_Post $post
* @return int
*/
public function bulk_and_quick_edit_save_post( $post_id, $post ) {
@ -656,6 +657,7 @@ class WC_Admin_CPT_Product extends WC_Admin_CPT {
if ( ! current_user_can( 'edit_post', $post_id ) )
return $post_id;
/** @todo remove */
global $woocommerce, $wpdb;
$product = get_product( $post );
@ -667,6 +669,8 @@ class WC_Admin_CPT_Product extends WC_Admin_CPT {
// Clear transient
wc_delete_product_transients( $post_id );
/** @todo return $post_id here? */
}
/**

View File

@ -57,10 +57,10 @@ class WC_Report_Customer_List extends WP_List_Table {
/**
* column_default function.
*
* @access public
* @param mixed $user
* @param mixed $column_name
* @param string $column_name
* @return int|string
*/
function column_default( $user, $column_name ) {
global $woocommerce, $wpdb;

View File

@ -271,11 +271,11 @@ class WC_Download_Handler {
/**
* readfile_chunked
*
* Reads file in chunks so big downloads are possible without changing PHP.INI - http://codeigniter.com/wiki/Download_helper_for_large_files/
*
* @param string file
* @param boolean return bytes of file
* @param string $file
* @param bool $retbytes return bytes of file
* @return bool|int
* @todo Meaning of the return value? Last return is status of fclose?
*/
public static function readfile_chunked( $file, $retbytes = true ) {

View File

@ -348,9 +348,10 @@ class WC_Product_Variation extends WC_Product {
/**
* Set stock level of the product variation.
*
* @param int $amount
* @param boolean $force_variation_stock If true, the variation's stock will be updated and not the parents.
* @param bool $force_variation_stock If true, the variation's stock will be updated and not the parents.
* @return int
* @todo Need to return 0 if is_null? Or something. Should not be just return.
*/
function set_stock( $amount = null, $force_variation_stock = false ) {
if ( is_null( $amount ) )

View File

@ -329,6 +329,8 @@ class WC_Shipping {
*
* @access public
* @param array $package cart items
* @return array
* @todo Return array() instead of false for consistent return type?
*/
public function calculate_shipping_for_package( $package = array() ) {
if ( ! $this->enabled ) return false;

View File

@ -108,8 +108,8 @@ function wc_print_notice( $message, $notice_type = 'success' ) {
/**
* Returns all queued notices, optionally filtered by a notice type.
*
* @param string $notice_type The singular name of the notice type - either error, success or notice. [optional]
* @return array|mixed
*/
function wc_get_notices( $notice_type = '' ) {