@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | * Assign datastore instance for use by the container fields |
| 500 | 500 | * |
| 501 | 501 | * @param Datastore_Interface $datastore |
| 502 | - * @return object $this |
|
| 502 | + * @return Container $this |
|
| 503 | 503 | **/ |
| 504 | 504 | public function set_datastore( Datastore_Interface $datastore, $set_as_default = false ) { |
| 505 | 505 | if ( $set_as_default && ! $this->has_default_datastore() ) { |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | * assigned to them instead. |
| 724 | 724 | * |
| 725 | 725 | * @param array $fields |
| 726 | - * @return object $this |
|
| 726 | + * @return Container $this |
|
| 727 | 727 | **/ |
| 728 | 728 | public function add_fields( $fields ) { |
| 729 | 729 | foreach ( $fields as $field ) { |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | * |
| 750 | 750 | * @param string $tab_name |
| 751 | 751 | * @param array $fields |
| 752 | - * @return object $this |
|
| 752 | + * @return Container $this |
|
| 753 | 753 | */ |
| 754 | 754 | public function add_tab( $tab_name, $fields ) { |
| 755 | 755 | $this->add_template( 'tabs', array( $this, 'template_tabs' ) ); |
@@ -141,7 +141,6 @@ |
||
| 141 | 141 | /** |
| 142 | 142 | * Check if container identificator id is unique |
| 143 | 143 | * |
| 144 | - * @param string $title |
|
| 145 | 144 | */ |
| 146 | 145 | protected function is_unique_panel_id( $id ) { |
| 147 | 146 | return ! in_array( $id, $this->registered_panel_ids ); |
@@ -406,8 +406,8 @@ discard block |
||
| 406 | 406 | /** |
| 407 | 407 | * Assign DataStore instance for use during load, save and delete |
| 408 | 408 | * |
| 409 | - * @param object $datastore |
|
| 410 | - * @return object $this |
|
| 409 | + * @param Datastore_Interface $datastore |
|
| 410 | + * @return Field $this |
|
| 411 | 411 | **/ |
| 412 | 412 | public function set_datastore( Datastore_Interface $datastore, $set_as_default = false ) { |
| 413 | 413 | if ( $set_as_default && ! $this->has_default_datastore() ) { |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | /** |
| 422 | 422 | * Return the DataStore instance used by the field |
| 423 | 423 | * |
| 424 | - * @return object $datastore |
|
| 424 | + * @return Datastore_Interface $datastore |
|
| 425 | 425 | **/ |
| 426 | 426 | public function get_datastore() { |
| 427 | 427 | return $this->datastore; |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | * Assign the type of the container this field is in |
| 432 | 432 | * |
| 433 | 433 | * @param string |
| 434 | - * @return object $this |
|
| 434 | + * @return Field $this |
|
| 435 | 435 | **/ |
| 436 | 436 | public function set_context( $context ) { |
| 437 | 437 | $this->context = $context; |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | /** |
| 469 | 469 | * Return a differently formatted value for end-users |
| 470 | 470 | * |
| 471 | - * @return mixed |
|
| 471 | + * @return string |
|
| 472 | 472 | **/ |
| 473 | 473 | public function get_formatted_value() { |
| 474 | 474 | $value = $this->get_value(); |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | * Set additional text to be displayed during field render, |
| 589 | 589 | * containing information and guidance for the user |
| 590 | 590 | * |
| 591 | - * @return object $this |
|
| 591 | + * @return Field $this |
|
| 592 | 592 | **/ |
| 593 | 593 | public function set_help_text( $help_text ) { |
| 594 | 594 | $this->help_text = $help_text; |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | * Alias for set_help_text() |
| 600 | 600 | * |
| 601 | 601 | * @see set_help_text() |
| 602 | - * @return object $this |
|
| 602 | + * @return Field $this |
|
| 603 | 603 | **/ |
| 604 | 604 | public function help_text( $help_text ) { |
| 605 | 605 | return $this->set_help_text( $help_text ); |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | /** |
| 609 | 609 | * Return the field help text |
| 610 | 610 | * |
| 611 | - * @return object $this |
|
| 611 | + * @return string $this |
|
| 612 | 612 | **/ |
| 613 | 613 | public function get_help_text() { |
| 614 | 614 | return $this->help_text; |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | * Whether or not this value should be auto loaded. Applicable to theme options only. |
| 619 | 619 | * |
| 620 | 620 | * @param bool $autoload |
| 621 | - * @return object $this |
|
| 621 | + * @return Field $this |
|
| 622 | 622 | **/ |
| 623 | 623 | public function set_autoload( $autoload ) { |
| 624 | 624 | $this->autoload = $autoload; |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | * Whether or not this field will be initialized when the field is in the viewport (visible). |
| 639 | 639 | * |
| 640 | 640 | * @param bool $lazyload |
| 641 | - * @return object $this |
|
| 641 | + * @return Field $this |
|
| 642 | 642 | **/ |
| 643 | 643 | public function set_lazyload( $lazyload ) { |
| 644 | 644 | $this->lazyload = $lazyload; |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | * Set the field width. |
| 659 | 659 | * |
| 660 | 660 | * @param int $width |
| 661 | - * @return object $this |
|
| 661 | + * @return Field $this |
|
| 662 | 662 | **/ |
| 663 | 663 | public function set_width( $width ) { |
| 664 | 664 | $this->width = (int) $width; |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | * Add custom CSS class to the field html container. |
| 679 | 679 | * |
| 680 | 680 | * @param string|array $classes |
| 681 | - * @return object $this |
|
| 681 | + * @return Field $this |
|
| 682 | 682 | **/ |
| 683 | 683 | public function add_class( $classes ) { |
| 684 | 684 | if ( ! is_array( $classes ) ) { |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | * Whether this field is mandatory for the user |
| 703 | 703 | * |
| 704 | 704 | * @param bool $required |
| 705 | - * @return object $this |
|
| 705 | + * @return Field $this |
|
| 706 | 706 | **/ |
| 707 | 707 | public function set_required( $required = true ) { |
| 708 | 708 | $this->required = $required; |
@@ -751,6 +751,7 @@ discard block |
||
| 751 | 751 | /** |
| 752 | 752 | * Cleans up an object class for usage as HTML class |
| 753 | 753 | * |
| 754 | + * @param string $type |
|
| 754 | 755 | * @return string |
| 755 | 756 | */ |
| 756 | 757 | protected function clean_type( $type ) { |
@@ -768,7 +769,7 @@ discard block |
||
| 768 | 769 | /** |
| 769 | 770 | * Return an array of html classes to be used for the field container |
| 770 | 771 | * |
| 771 | - * @return array |
|
| 772 | + * @return string[] |
|
| 772 | 773 | */ |
| 773 | 774 | public function get_html_class() { |
| 774 | 775 | $html_classes = array(); |