@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * Singleton implementation |
53 | 53 | * |
54 | - * @return Carbon_Fields\Carbon_Fields |
|
54 | + * @return Carbon_Fields|null |
|
55 | 55 | */ |
56 | 56 | public static function instance() { |
57 | 57 | static $instance = null; |
@@ -134,7 +134,6 @@ discard block |
||
134 | 134 | /** |
135 | 135 | * Extend Carbon Fields by adding a new entity (container condition etc.) |
136 | 136 | * |
137 | - * @param string $type Type of extension - 'container_condition' |
|
138 | 137 | * @param string $class Extension class name |
139 | 138 | * @param string $extender Extending callable |
140 | 139 | */ |
@@ -231,7 +230,6 @@ discard block |
||
231 | 230 | /** |
232 | 231 | * Remove a listener from any event |
233 | 232 | * |
234 | - * @param Listener $removed_listener |
|
235 | 233 | */ |
236 | 234 | public static function remove_listener( $listener ) { |
237 | 235 | static::instance()->get_emitter()->remove_listener( $listener ); |
@@ -383,6 +383,7 @@ discard block |
||
383 | 383 | /** |
384 | 384 | * Check if all conditions pass for object |
385 | 385 | * |
386 | + * @param integer $object_id |
|
386 | 387 | * @return bool |
387 | 388 | */ |
388 | 389 | protected function all_conditions_pass( $object_id ) { |
@@ -543,7 +544,7 @@ discard block |
||
543 | 544 | * Set datastore instance |
544 | 545 | * |
545 | 546 | * @param Datastore_Interface $datastore |
546 | - * @return object $this |
|
547 | + * @return Container $this |
|
547 | 548 | */ |
548 | 549 | public function set_datastore( Datastore_Interface $datastore, $set_as_default = false ) { |
549 | 550 | if ( $set_as_default && ! $this->has_default_datastore() ) { |
@@ -711,7 +712,7 @@ discard block |
||
711 | 712 | * Set CSS classes that the container should use. |
712 | 713 | * |
713 | 714 | * @param string|array<string> $classes |
714 | - * @return object $this |
|
715 | + * @return Container $this |
|
715 | 716 | */ |
716 | 717 | public function set_classes( $classes ) { |
717 | 718 | $this->classes = Helper::sanitize_classes( $classes ); |
@@ -770,7 +771,7 @@ discard block |
||
770 | 771 | * assigned to them instead. |
771 | 772 | * |
772 | 773 | * @param array $fields |
773 | - * @return object $this |
|
774 | + * @return Container $this |
|
774 | 775 | */ |
775 | 776 | public function add_fields( $fields ) { |
776 | 777 | foreach ( $fields as $field ) { |
@@ -800,7 +801,7 @@ discard block |
||
800 | 801 | * |
801 | 802 | * @param string $tab_name |
802 | 803 | * @param array $fields |
803 | - * @return object $this |
|
804 | + * @return Container $this |
|
804 | 805 | */ |
805 | 806 | public function add_tab( $tab_name, $fields ) { |
806 | 807 | $this->add_fields( $fields ); |
@@ -203,7 +203,6 @@ discard block |
||
203 | 203 | /** |
204 | 204 | * Create a new field of type $type and name $name and label $label. |
205 | 205 | * |
206 | - * @param string $type |
|
207 | 206 | * @param string $name lower case and underscore-delimited |
208 | 207 | * @param string $label (optional) Automatically generated from $name if not present |
209 | 208 | * @return Field |
@@ -465,7 +464,7 @@ discard block |
||
465 | 464 | * Set datastore instance |
466 | 465 | * |
467 | 466 | * @param Datastore_Interface $datastore |
468 | - * @return object $this |
|
467 | + * @return Field $this |
|
469 | 468 | */ |
470 | 469 | public function set_datastore( Datastore_Interface $datastore, $set_as_default = false ) { |
471 | 470 | if ( $set_as_default && ! $this->has_default_datastore() ) { |
@@ -489,7 +488,7 @@ discard block |
||
489 | 488 | * Assign the type of the container this field is in |
490 | 489 | * |
491 | 490 | * @param string |
492 | - * @return object $this |
|
491 | + * @return Field $this |
|
493 | 492 | */ |
494 | 493 | public function set_context( $context ) { |
495 | 494 | $this->context = $context; |
@@ -594,6 +593,7 @@ discard block |
||
594 | 593 | |
595 | 594 | /** |
596 | 595 | * Set field base name as defined in the container. |
596 | + * @param string $name |
|
597 | 597 | */ |
598 | 598 | public function set_base_name( $name ) { |
599 | 599 | $this->base_name = $name; |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | /** |
691 | 691 | * Return the field help text |
692 | 692 | * |
693 | - * @return object $this |
|
693 | + * @return string $this |
|
694 | 694 | */ |
695 | 695 | public function get_help_text() { |
696 | 696 | return $this->help_text; |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | * Set additional text to be displayed during field render, |
701 | 701 | * containing information and guidance for the user |
702 | 702 | * |
703 | - * @return object $this |
|
703 | + * @return Field $this |
|
704 | 704 | */ |
705 | 705 | public function set_help_text( $help_text ) { |
706 | 706 | $this->help_text = $help_text; |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | * Alias for set_help_text() |
712 | 712 | * |
713 | 713 | * @see set_help_text() |
714 | - * @return object $this |
|
714 | + * @return Field $this |
|
715 | 715 | */ |
716 | 716 | public function help_text( $help_text ) { |
717 | 717 | return $this->set_help_text( $help_text ); |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | * Whether or not this value should be auto loaded. Applicable to theme options only. |
731 | 731 | * |
732 | 732 | * @param bool $autoload |
733 | - * @return object $this |
|
733 | + * @return Field $this |
|
734 | 734 | */ |
735 | 735 | public function set_autoload( $autoload ) { |
736 | 736 | $this->autoload = $autoload; |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | * Whether or not this field will be initialized when the field is in the viewport (visible). |
751 | 751 | * |
752 | 752 | * @param bool $lazyload |
753 | - * @return object $this |
|
753 | + * @return Field $this |
|
754 | 754 | */ |
755 | 755 | public function set_lazyload( $lazyload ) { |
756 | 756 | $this->lazyload = $lazyload; |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | * Set the field width. |
771 | 771 | * |
772 | 772 | * @param int $width |
773 | - * @return object $this |
|
773 | + * @return Field $this |
|
774 | 774 | */ |
775 | 775 | public function set_width( $width ) { |
776 | 776 | $this->width = (int) $width; |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | * Set CSS classes that the container should use. |
791 | 791 | * |
792 | 792 | * @param string|array<string> $classes |
793 | - * @return object $this |
|
793 | + * @return Field $this |
|
794 | 794 | */ |
795 | 795 | public function set_classes( $classes ) { |
796 | 796 | $this->classes = Helper::sanitize_classes( $classes ); |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | * Whether this field is mandatory for the user |
802 | 802 | * |
803 | 803 | * @param bool $required |
804 | - * @return object $this |
|
804 | + * @return Field $this |
|
805 | 805 | */ |
806 | 806 | public function set_required( $required = true ) { |
807 | 807 | $this->required = $required; |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * |
242 | 242 | * @param array<string> $condition_types |
243 | 243 | * @param Carbon_Fields\Container\Container $container |
244 | - * @return array<string> |
|
244 | + * @return string[] |
|
245 | 245 | */ |
246 | 246 | public function filter_post_meta_container_static_condition_types( $condition_types, $container_type, $container ) { |
247 | 247 | return array_merge( |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | * |
256 | 256 | * @param array<string> $condition_types |
257 | 257 | * @param Carbon_Fields\Container\Container $container |
258 | - * @return array<string> |
|
258 | + * @return string[] |
|
259 | 259 | */ |
260 | 260 | public function filter_post_meta_container_dynamic_condition_types( $condition_types, $container_type, $container ) { |
261 | 261 | return array_merge( |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | * |
270 | 270 | * @param array<string> $condition_types |
271 | 271 | * @param Carbon_Fields\Container\Container $container |
272 | - * @return array<string> |
|
272 | + * @return string[] |
|
273 | 273 | */ |
274 | 274 | public function filter_term_meta_container_static_condition_types( $condition_types, $container_type, $container ) { |
275 | 275 | return array_merge( |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * |
284 | 284 | * @param array<string> $condition_types |
285 | 285 | * @param Carbon_Fields\Container\Container $container |
286 | - * @return array<string> |
|
286 | + * @return string[] |
|
287 | 287 | */ |
288 | 288 | public function filter_term_meta_container_dynamic_condition_types( $condition_types, $container_type, $container ) { |
289 | 289 | return array_merge( |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | * |
298 | 298 | * @param array<string> $condition_types |
299 | 299 | * @param Carbon_Fields\Container\Container $container |
300 | - * @return array<string> |
|
300 | + * @return string[] |
|
301 | 301 | */ |
302 | 302 | public function filter_user_meta_container_static_condition_types( $condition_types, $container_type, $container ) { |
303 | 303 | return array_merge( |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | * |
312 | 312 | * @param array<string> $condition_types |
313 | 313 | * @param Carbon_Fields\Container\Container $container |
314 | - * @return array<string> |
|
314 | + * @return string[] |
|
315 | 315 | */ |
316 | 316 | public function filter_user_meta_container_dynamic_condition_types( $condition_types, $container_type, $container ) { |
317 | 317 | return array_merge( |