Completed
Pull Request — staging (#840)
by
unknown
16:56
created
src/Exception/InvalidRecaptcha.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	 */
Please login to merge, or discard this patch.
src/Field/BaseInput.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,6 @@
 block discarded – undo
9 9
 
10 10
 namespace YIKES\EasyForms\Field;
11 11
 
12
-use YIKES\EasyForms\Exception\MustExtend;
13
-
14 12
 /**
15 13
  * Class BaseInput
16 14
  *
Please login to merge, or discard this patch.
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -57,10 +57,8 @@
 block discarded – undo
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
-	 * @param string $name        Field name.
64 62
 	 */
65 63
 	public function __construct( $classes, $placeholder, $label, $value, $description, $merge, $form_id, $hidden, $required ) {
66 64
 		$this->classes     = $classes;
Please login to merge, or discard this patch.
src/Field/Hidden.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,6 @@
 block discarded – undo
9 9
 
10 10
 namespace YIKES\EasyForms\Field;
11 11
 
12
-use YIKES\EasyForms\Exception\InvalidField;
13
-
14 12
 /**
15 13
  * Class Hidden
16 14
  *
Please login to merge, or discard this patch.
src/Recaptcha/Recaptcha.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use YIKES\EasyForms\Assets\AssetsAwareness;
14 14
 use YIKES\EasyForms\Assets\ScriptAsset;
15 15
 use YIKES\EasyForms\Service;
16
-use YIKES\EasyForms\View\View;
17 16
 use YIKES\EasyForms\Model\Recaptcha as RecaptchaModel;
18 17
 
19 18
 /**
Please login to merge, or discard this patch.
src/Shortcode/EasyFormsShortcode.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	 */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 use YIKES\EasyForms\Model\Subscriber;
18 18
 use YIKES\EasyForms\Model\SubscriberRepository;
19 19
 use YIKES\EasyForms\Model\OptinForm as EasyFormsModel;
20
-use YIKES\EasyForms\Model\Recaptcha as RecaptchaModel;
21 20
 
22 21
 /**
23 22
  * Class EasyFormsShortcode
Please login to merge, or discard this patch.
src/Form/OptinForm.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -14,11 +14,6 @@
 block discarded – undo
14 14
 use YIKES\EasyForms\Field\Field;
15 15
 use YIKES\EasyForms\Field\Hidden;
16 16
 use YIKES\EasyForms\Field\Types;
17
-use YIKES\EasyForms\Renderable;
18
-use YIKES\EasyForms\Assets\AssetsAware;
19
-use YIKES\EasyForms\Assets\AssetsAwareness;
20
-use YIKES\EasyForms\Assets\ScriptAsset;
21
-use YIKES\EasyForms\Service;
22 17
 use YIKES\EasyForms\Model\OptinForm as EasyFormsModel;
23 18
 use YIKES\EasyForms\Model\Recaptcha as RecaptchaModel;
24 19
 use YIKES\EasyForms\Model\OptinMeta as Meta;
Please login to merge, or discard this patch.
views/easy-forms-shortcode.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,6 @@
 block discarded – undo
9 9
 
10 10
 namespace YIKES\EasyForms;
11 11
 
12
-use YIKES\EasyForms\Util\Debugger;
13
-
14 12
 // Only run this within WordPress.
15 13
 if ( ! defined( 'ABSPATH' ) ) {
16 14
 	die();
Please login to merge, or discard this patch.
src/Form/FieldBuilder.php 1 patch
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -10,6 +10,10 @@  discard block
 block discarded – undo
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 = [];
@@ -80,6 +84,9 @@  discard block
 block discarded – undo
80 84
         $this->hidden_label_count = $this->hidden_label_count++;
81 85
     }
82 86
 
87
+    /**
88
+     * @param string $field
89
+     */
83 90
     protected function get_label( $field ) {
84 91
         $label = [];
85 92
         if( $field['type'] == 'email' ) {
@@ -96,6 +103,9 @@  discard block
 block discarded – undo
96 103
         return $label;
97 104
     }
98 105
 
106
+    /**
107
+     * @param string $field
108
+     */
99 109
     protected function get_value( $field ) {
100 110
         // pass our default value through our filter to parse dynamic data by tag (used solely for 'text' type)
101 111
         $default_value = ( isset( $field['default'] ) ? esc_attr( $field['default'] ) : '' );
@@ -103,10 +113,16 @@  discard block
 block discarded – undo
103 113
         return apply_filters( 'yikes-mailchimp-' . $field['merge'] . '-default-value', $default_value, $field, $this->form_id );
104 114
     }
105 115
 
116
+    /**
117
+     * @param string $field
118
+     */
106 119
     protected function get_placeholder( $field ) {
107 120
         return isset( $field['placeholder'] ) ? $field['placeholder'] : '';
108 121
     }
109 122
 
123
+    /**
124
+     * @param string $field
125
+     */
110 126
     protected function get_hidden( $field ) {
111 127
         $visible = false;
112 128
         // if both hide label and hide field are checked, we gotta hide the field!
@@ -118,6 +134,9 @@  discard block
 block discarded – undo
118 134
         return $visible;
119 135
     }
120 136
 
137
+    /**
138
+     * @param string $field
139
+     */
121 140
     protected function get_description( $field ) {
122 141
         $description       = '';
123 142
         $show_description  = isset( $field['description'] ) ? true : false;
Please login to merge, or discard this patch.