Completed
Pull Request — staging (#840)
by
unknown
15:23
created
src/Shortcode/EasyFormsShortcode.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,6 @@
 block discarded – undo
9 9
 
10 10
 namespace YIKES\EasyForms\Shortcode;
11 11
 
12
-use YIKES\EasyForms\Asset;
13
-use YIKES\EasyForms\AssetAware;
14
-use YIKES\EasyForms\ScriptAsset;
15
-use YIKES\EasyForms\StyleAsset;
16 12
 use YIKES\EasyForms\Exception;
17 13
 use YIKES\EasyForms\View\FormEscapedView;
18 14
 use YIKES\EasyForms\View\NoOverrideLocationView;
Please login to merge, or discard this patch.
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 final class EasyFormsShortcode extends BaseShortcode {
33 33
 
34
-    const TAG           = 'yikes-mailchimp';
34
+	 const TAG           = 'yikes-mailchimp';
35 35
 	const VIEW_URI      = 'views/easy-forms-shortcode';
36 36
 	const SUBMITTED_URI = 'views/easy-forms-shortcode-completed';
37 37
 
@@ -52,26 +52,26 @@  discard block
 block discarded – undo
52 52
 	 * @since %VERSION%
53 53
 	 * @var string
54 54
 	 */
55
-    private $view_uri = self::VIEW_URI;
55
+	 private $view_uri = self::VIEW_URI;
56 56
     
57
-    /**
58
-	 * Register the Shortcode.
59
-	 *
60
-	 * @since %VERSION%
61
-	 */
57
+	 /**
58
+	  * Register the Shortcode.
59
+	  *
60
+	  * @since %VERSION%
61
+	  */
62 62
 	public function register() {
63 63
 		parent::register();
64 64
 		add_action( 'easy_forms_do_shortcode', function( $atts ) {
65 65
 			echo $this->process_shortcode( $atts ); // phpcs:ignore WordPress.Security.EscapeOutput
66 66
 		} );
67
-    }
67
+	 }
68 68
     
69
-    /**
70
-	 * Get the default array of attributes for the shortcode.
71
-	 *
72
-	 * @since %VERSION%
73
-	 * @return array
74
-	 */
69
+	 /**
70
+	  * Get the default array of attributes for the shortcode.
71
+	  *
72
+	  * @since %VERSION%
73
+	  * @return array
74
+	  */
75 75
 	public function get_default_atts() {
76 76
 		return [
77 77
 			'form'                       => '',
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		}
146 146
 	}
147 147
     
148
-   /**
148
+	/**
149 149
 	 * Get the View URI to use for rendering the shortcode.
150 150
 	 *
151 151
 	 * @since %VERSION%
@@ -158,15 +158,15 @@  discard block
 block discarded – undo
158 158
 		}
159 159
 
160 160
 		return $this->view_uri;
161
-    }
161
+	 }
162 162
     
163
-    /**
164
-	 * Set the view URI.
165
-	 *
166
-	 * @since %VERSION%
167
-	 *
168
-	 * @param string $uri The URI to use.
169
-	 */
163
+	 /**
164
+	  * Set the view URI.
165
+	  *
166
+	  * @since %VERSION%
167
+	  *
168
+	  * @param string $uri The URI to use.
169
+	  */
170 170
 	private function set_view_uri( $uri ) {
171 171
 		$this->view_uri = $uri;
172 172
 	}
@@ -181,15 +181,15 @@  discard block
 block discarded – undo
181 181
 		return ! empty( $_POST );
182 182
 	}
183 183
     
184
-    /**
185
-	 * Render the current Renderable.
186
-	 *
187
-	 * @since %VERSION%
188
-	 *
189
-	 * @param array $context Context in which to render.
190
-	 *
191
-	 * @return string Rendered HTML.
192
-	 */
184
+	 /**
185
+	  * Render the current Renderable.
186
+	  *
187
+	  * @since %VERSION%
188
+	  *
189
+	  * @param array $context Context in which to render.
190
+	  *
191
+	  * @return string Rendered HTML.
192
+	  */
193 193
 	public function render( array $context = [] ) {
194 194
 		try {
195 195
 			$this->enqueue_assets();
@@ -240,15 +240,15 @@  discard block
 block discarded – undo
240 240
 		return isset( $subscriber ) ? $subscriber : null;
241 241
 	}
242 242
     
243
-    /**
244
-	 * Convert an exception to a string.
245
-	 *
246
-	 * @since %VERSION%
247
-	 *
248
-	 * @param \Exception $e The exception object.
249
-	 *
250
-	 * @return string
251
-	 */
243
+	 /**
244
+	  * Convert an exception to a string.
245
+	  *
246
+	  * @since %VERSION%
247
+	  *
248
+	  * @param \Exception $e The exception object.
249
+	  *
250
+	  * @return string
251
+	  */
252 252
 	private function exception_to_string( \Exception $e ) {
253 253
 		return sprintf(
254 254
 			/* translators: %s refers to the error message */
Please login to merge, or discard this patch.