@@ -23,7 +23,6 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @since %VERSION% |
| 25 | 25 | * |
| 26 | - * @param string $field Class name of the service that was not recognized. |
|
| 27 | 26 | * |
| 28 | 27 | * @return static |
| 29 | 28 | */ |
@@ -41,7 +40,6 @@ discard block |
||
| 41 | 40 | * |
| 42 | 41 | * @since %VERSION% |
| 43 | 42 | * |
| 44 | - * @param string $field Class name of the service that was not recognized. |
|
| 45 | 43 | * |
| 46 | 44 | * @return static |
| 47 | 45 | */ |
@@ -57,7 +57,6 @@ |
||
| 57 | 57 | /** |
| 58 | 58 | * Construct Field |
| 59 | 59 | * |
| 60 | - * @param string $id Fields ID. |
|
| 61 | 60 | * @param array $classes Field and label classes. |
| 62 | 61 | * @param string $placeholder Fields placeholder. |
| 63 | 62 | * @param string $name Field name. |
@@ -10,6 +10,10 @@ discard block |
||
| 10 | 10 | namespace YIKES\EasyForms\Form; |
| 11 | 11 | |
| 12 | 12 | trait FieldBuilder { |
| 13 | + |
|
| 14 | + /** |
|
| 15 | + * @param string $field |
|
| 16 | + */ |
|
| 13 | 17 | protected function get_field_classes( $field ) { |
| 14 | 18 | $field_classes = []; |
| 15 | 19 | $label_classes = []; |
@@ -77,6 +81,9 @@ discard block |
||
| 77 | 81 | $this->hidden_label_count = $this->hidden_label_count++; |
| 78 | 82 | } |
| 79 | 83 | |
| 84 | + /** |
|
| 85 | + * @param string $field |
|
| 86 | + */ |
|
| 80 | 87 | protected function get_label( $field ) { |
| 81 | 88 | $label = []; |
| 82 | 89 | if( $field['type'] == 'email' ) { |
@@ -93,6 +100,9 @@ discard block |
||
| 93 | 100 | return $label; |
| 94 | 101 | } |
| 95 | 102 | |
| 103 | + /** |
|
| 104 | + * @param string $field |
|
| 105 | + */ |
|
| 96 | 106 | protected function get_value( $field ) { |
| 97 | 107 | // pass our default value through our filter to parse dynamic data by tag (used solely for 'text' type) |
| 98 | 108 | $default_value = ( isset( $field['default'] ) ? esc_attr( $field['default'] ) : '' ); |
@@ -100,10 +110,16 @@ discard block |
||
| 100 | 110 | return apply_filters( 'yikes-mailchimp-' . $field['merge'] . '-default-value', $default_value, $field, $this->form_id ); |
| 101 | 111 | } |
| 102 | 112 | |
| 113 | + /** |
|
| 114 | + * @param string $field |
|
| 115 | + */ |
|
| 103 | 116 | protected function get_placeholder( $field ) { |
| 104 | 117 | return isset( $field['placeholder'] ) ? $field['placeholder'] : ''; |
| 105 | 118 | } |
| 106 | 119 | |
| 120 | + /** |
|
| 121 | + * @param string $field |
|
| 122 | + */ |
|
| 107 | 123 | protected function get_hidden( $field ) { |
| 108 | 124 | $visible = true; |
| 109 | 125 | // if both hide label and hide field are checked, we gotta hide the field! |
@@ -115,6 +131,9 @@ discard block |
||
| 115 | 131 | return $visible; |
| 116 | 132 | } |
| 117 | 133 | |
| 134 | + /** |
|
| 135 | + * @param string $field |
|
| 136 | + */ |
|
| 118 | 137 | protected function get_description( $field ) { |
| 119 | 138 | $show_description = false; |
| 120 | 139 | $description_above = false; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @since %VERSION% |
| 92 | 92 | * |
| 93 | - * @param array $atts Array of shortcode attributes. |
|
| 93 | + * @param array $attr Array of shortcode attributes. |
|
| 94 | 94 | * |
| 95 | 95 | * @return array Context to pass onto view. |
| 96 | 96 | * @throws InvalidPostID When the post ID is not valid. |
@@ -199,7 +199,6 @@ discard block |
||
| 199 | 199 | * |
| 200 | 200 | * @param int $form_id The ID for the form. |
| 201 | 201 | * @param EasyFormsModel $form_data The form Object. |
| 202 | - * @param array $field_classes The classes for fields in the form. |
|
| 203 | 202 | * |
| 204 | 203 | * @return EasyForm |
| 205 | 204 | */ |