diff --git a/includes/CMB2_Field.php b/includes/CMB2_Field.php index fbcbf1d54..435f39d45 100644 --- a/includes/CMB2_Field.php +++ b/includes/CMB2_Field.php @@ -492,9 +492,9 @@ public function repeatable_exception( $type ) { /** * Escape the value before output. Defaults to 'esc_attr()' * @since 1.0.1 - * @param mixed $meta_value Meta value - * @param mixed $func Escaping function (if not esc_attr()) - * @return mixed Final value + * @param mixed $meta_value Meta value + * @param callable $func Escaping function (if not esc_attr()) + * @return mixed Final value */ public function escaped_value( $func = 'esc_attr', $meta_value = '' ) { diff --git a/includes/CMB2_Options.php b/includes/CMB2_Options.php index 964669269..f950fb340 100644 --- a/includes/CMB2_Options.php +++ b/includes/CMB2_Options.php @@ -98,7 +98,7 @@ function get( $field_id, $default = false ) { * @param mixed $value Value to update data with * @param bool $resave Whether to re-save the data * @param bool $single Whether data should not be an array - * @return array Modified options + * @return boolean Return status of update */ function update( $field_id, $value = '', $resave = false, $single = true ) { $this->get_options(); @@ -128,7 +128,7 @@ function update( $field_id, $value = '', $resave = false, $single = true ) { * overwriting the option value to be stored. * * @since 1.0.1 - * @return boolean Success/Failure + * @return boolean Success/Failure */ function set( $options = false ) { $this->options = $options ? $options : $this->options; diff --git a/includes/CMB2_Sanitize.php b/includes/CMB2_Sanitize.php index be1b4e5d8..911b97f30 100644 --- a/includes/CMB2_Sanitize.php +++ b/includes/CMB2_Sanitize.php @@ -22,8 +22,8 @@ class CMB2_Sanitize { /** * Setup our class vars * @since 1.1.0 - * @param object $field A CMB field object - * @param mixed $value Field value + * @param CMB2_Field $field A CMB field object + * @param mixed $value Field value */ public function __construct( CMB2_Field $field, $value ) { $this->field = $field; @@ -101,7 +101,7 @@ public function default_sanitization( $value ) { * Simple checkbox validation * @since 1.0.1 * @param mixed $value 'on' or false - * @return mixed 'on' or false + * @return string|false 'on' or false */ public function checkbox( $value ) { return $value === 'on' ? 'on' : false; diff --git a/includes/helper-functions.php b/includes/helper-functions.php index f3647c6c2..37ed236fb 100644 --- a/includes/helper-functions.php +++ b/includes/helper-functions.php @@ -83,8 +83,8 @@ function cmb2_get_option( $option_key, $field_id = '' ) { * @param string $option_key Option key * @param string $field_id Option array field key * @param mixed $value Value to update data with - * @param bool $single Whether data should not be an array - * @return array Modified options + * @param boolean $single Whether data should not be an array + * @return boolean Success/Failure */ function cmb2_update_option( $option_key, $field_id, $value, $single = true ) { if ( cmb2_options( $option_key )->update( $field_id, $value, false, $single ) ) { @@ -101,7 +101,7 @@ function cmb2_update_option( $option_key, $field_id, $value, $single = true ) { * @param array $field_id Field ID or all field arguments * @param int $object_id Object ID * @param string $object_type Type of object being saved. (e.g., post, user, comment, or options-page) - * @return object CMB2_Field object + * @return CMB2_Field|null CMB2_Field object unless metabox config cannot be found */ function cmb2_get_field( $meta_box, $field_id, $object_id = 0, $object_type = 'post' ) {