@@ -267,7 +267,7 @@ |
||
267 | 267 | * Add 'closed' class to metabox |
268 | 268 | * @since 2.0.0 |
269 | 269 | * @param array $classes Array of classes |
270 | - * @return array Modified array of classes |
|
270 | + * @return string[] Modified array of classes |
|
271 | 271 | */ |
272 | 272 | public function close_metabox_class( $classes ) { |
273 | 273 | $classes[] = 'closed'; |
@@ -357,6 +357,7 @@ discard block |
||
357 | 357 | /** |
358 | 358 | * Gets the values for the `file` field type from the data being saved. |
359 | 359 | * @since 2.2.0 |
360 | + * @param string $id_key |
|
360 | 361 | */ |
361 | 362 | public function _get_group_file_value_array( $id_key ) { |
362 | 363 | $alldata = $this->field->group->data_to_save; |
@@ -378,6 +379,7 @@ discard block |
||
378 | 379 | /** |
379 | 380 | * Peforms saving of `file` attachement's ID |
380 | 381 | * @since 1.1.0 |
382 | + * @param string $file_id_key |
|
381 | 383 | */ |
382 | 384 | public function _save_file_id_value( $file_id_key ) { |
383 | 385 | $id_field = $this->_new_supporting_field( $file_id_key ); |
@@ -398,6 +400,7 @@ discard block |
||
398 | 400 | /** |
399 | 401 | * Peforms saving of `text_datetime_timestamp_timezone` utc timestamp |
400 | 402 | * @since 2.2.0 |
403 | + * @param string $utc_key |
|
401 | 404 | */ |
402 | 405 | public function _save_utc_value( $utc_key, $utc_stamp ) { |
403 | 406 | return $this->_new_supporting_field( $utc_key )->save_field( $utc_stamp ); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Get the singleton instance of this class |
32 | 32 | * @since 2.2.2 |
33 | - * @return object |
|
33 | + * @return CMB2_Ajax |
|
34 | 34 | */ |
35 | 35 | public static function get_instance() { |
36 | 36 | if ( ! ( self::$instance instanceof self ) ) { |
@@ -221,7 +221,6 @@ discard block |
||
221 | 221 | * |
222 | 222 | * @since 1.3.0 |
223 | 223 | * @param string $meta_key Postmeta's key |
224 | - * @param mixed $meta_value (Optional) value of the postmeta to be saved |
|
225 | 224 | */ |
226 | 225 | protected function cache_action( $meta_key ) { |
227 | 226 | $func_args = func_get_args(); |
@@ -84,7 +84,6 @@ discard block |
||
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Fall back to CMB2_Types methods |
87 | - * @param string $field |
|
88 | 87 | * @throws Exception Throws an exception if the field is invalid. |
89 | 88 | * @return mixed |
90 | 89 | */ |
@@ -105,7 +104,7 @@ discard block |
||
105 | 104 | * Magic getter for our object. |
106 | 105 | * @param string $field |
107 | 106 | * @throws Exception Throws an exception if the field is invalid. |
108 | - * @return mixed |
|
107 | + * @return CMB2_Field |
|
109 | 108 | */ |
110 | 109 | public function __get( $field ) { |
111 | 110 | switch ( $field ) { |
@@ -38,6 +38,9 @@ discard block |
||
38 | 38 | return $date_input . "\n" . $time_input; |
39 | 39 | } |
40 | 40 | |
41 | + /** |
|
42 | + * @param boolean $has_good_value |
|
43 | + */ |
|
41 | 44 | public function date_args( $args, $has_good_value ) { |
42 | 45 | $date_args = wp_parse_args( $args['datepicker'], array( |
43 | 46 | 'class' => 'cmb2-text-small cmb2-datepicker', |
@@ -51,6 +54,9 @@ discard block |
||
51 | 54 | return $this->parse_picker_options( 'date', $date_args ); |
52 | 55 | } |
53 | 56 | |
57 | + /** |
|
58 | + * @param boolean $has_good_value |
|
59 | + */ |
|
54 | 60 | public function time_args( $args, $has_good_value ) { |
55 | 61 | $time_args = wp_parse_args( $args['timepicker'], array( |
56 | 62 | 'class' => 'cmb2-timepicker text-time', |
@@ -15,7 +15,6 @@ |
||
15 | 15 | /** |
16 | 16 | * Handles outputting a 'wysiwyg' element |
17 | 17 | * @since 1.1.0 |
18 | - * @param array $args Override arguments |
|
19 | 18 | * @return string Form wysiwyg element |
20 | 19 | */ |
21 | 20 | public function render() { |
@@ -15,7 +15,6 @@ |
||
15 | 15 | /** |
16 | 16 | * Handles outputting a 'wysiwyg' element |
17 | 17 | * @since 1.1.0 |
18 | - * @param array $args Override arguments |
|
19 | 18 | * @return string Form wysiwyg element |
20 | 19 | */ |
21 | 20 | public function render() { |
@@ -317,8 +317,8 @@ |
||
317 | 317 | * Reimplementation of DateTime::createFromFormat for PHP < 5.3. :( |
318 | 318 | * Borrowed from http://stackoverflow.com/questions/5399075/php-datetimecreatefromformat-in-5-2 |
319 | 319 | * |
320 | - * @param $date_format |
|
321 | - * @param $date_value |
|
320 | + * @param string $date_format |
|
321 | + * @param string $date_value |
|
322 | 322 | * |
323 | 323 | * @return DateTime |
324 | 324 | */ |
@@ -409,6 +409,7 @@ discard block |
||
409 | 409 | * Add a hidden field to the list of hidden fields to be rendered later |
410 | 410 | * @since 2.0.0 |
411 | 411 | * @param array $field_args Array of field arguments to be passed to CMB2_Field |
412 | + * @param CMB2_Field $field_group |
|
412 | 413 | */ |
413 | 414 | public function add_hidden_field( $field_args, $field_group = null ) { |
414 | 415 | if ( isset( $field_args['field_args'] ) ) { |
@@ -610,7 +611,7 @@ discard block |
||
610 | 611 | /** |
611 | 612 | * Save a repeatable group |
612 | 613 | * @since 1.x.x |
613 | - * @param array $field_group CMB2_Field group field object |
|
614 | + * @param CMB2_Field $field_group CMB2_Field group field object |
|
614 | 615 | * @return mixed Return of CMB2_Field::update_data() |
615 | 616 | */ |
616 | 617 | public function save_group_field( $field_group ) { |
@@ -910,7 +911,7 @@ discard block |
||
910 | 911 | * @param mixed $field_id Field (or group field) ID |
911 | 912 | * @param mixed $field_args Array of field arguments |
912 | 913 | * @param mixed $sub_field_id Sub field ID (if field_group exists) |
913 | - * @param mixed $field_group If a sub-field, will be the parent group CMB2_Field object |
|
914 | + * @param CMB2_Field|null $field_group If a sub-field, will be the parent group CMB2_Field object |
|
914 | 915 | * @return array Array of CMB2_Field arguments |
915 | 916 | */ |
916 | 917 | public function get_field_args( $field_id, $field_args, $sub_field_id, $field_group ) { |
@@ -997,7 +998,7 @@ discard block |
||
997 | 998 | * @since 2.0.0 |
998 | 999 | * @param array $field Metabox field config array |
999 | 1000 | * @param int $position (optional) Position of metabox. 1 for first, etc |
1000 | - * @return mixed Field id or false |
|
1001 | + * @return string Field id or false |
|
1001 | 1002 | */ |
1002 | 1003 | public function add_field( array $field, $position = 0 ) { |
1003 | 1004 | if ( ! is_array( $field ) || ! array_key_exists( 'id', $field ) ) { |