Passed
Push — master ( a74976...b3d616 )
by Paul
03:42
created
plugin/Shortcodes/Shortcode.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 			'after_widget' => '</div>',
23 23
 			'before_title' => '<h3 class="glsr-shortcode-title">',
24 24
 			'after_title' => '</h3>',
25
-		]);
25
+		] );
26 26
 		$instance = $this->normalize( $instance );
27 27
 		$partial = glsr( Html::class )->buildPartial( $shortcodePartial, $instance );
28
-		if( !empty( $instance['title'] )) {
28
+		if( !empty($instance['title']) ) {
29 29
 			$instance['title'] = $args['before_title'].$instance['title'].$args['after_title'];
30 30
 		}
31 31
 		return $args['before_widget'].$instance['title'].$partial.$args['after_widget'];
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function normalize( $args )
70 70
 	{
71
-		$args = shortcode_atts( $this->getDefaults(), wp_parse_args( $args ));
71
+		$args = shortcode_atts( $this->getDefaults(), wp_parse_args( $args ) );
72 72
 		array_walk( $args, function( &$value, $key ) {
73 73
 			$methodName = glsr( Helper::class )->buildMethodName( $key, 'normalize' );
74
-			if( !method_exists( $this, $methodName ))return;
74
+			if( !method_exists( $this, $methodName ) )return;
75 75
 			$value = $this->$methodName( $value );
76 76
 		});
77 77
 		return $this->sanitize( $args );
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	protected function normalizeHide( $hide )
105 105
 	{
106
-		if( is_string( $hide )) {
106
+		if( is_string( $hide ) ) {
107 107
 			$hide = explode( ',', $hide );
108 108
 		}
109 109
 		$hiddenKeys = defined( 'static::HIDDEN_KEYS' )
110 110
 			? static::HIDDEN_KEYS
111 111
 			: [];
112
-		return array_filter( array_map( 'trim', $hide ), function( $value ) use( $hiddenKeys ) {
112
+		return array_filter( array_map( 'trim', $hide ), function( $value ) use($hiddenKeys) {
113 113
 			return in_array( $value, $hiddenKeys );
114 114
 		});
115 115
 	}
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
 			__( 'Terrible', 'site-reviews' ),
138 138
 		];
139 139
 		$defaults = array_pad( $defaults, Rating::MAX_RATING, '' );
140
-		$labels = array_map( 'trim', explode( ',', $labels ));
140
+		$labels = array_map( 'trim', explode( ',', $labels ) );
141 141
 		foreach( $defaults as $i => $label ) {
142
-			if( empty( $labels[$i] ))continue;
142
+			if( empty($labels[$i]) )continue;
143 143
 			$defaults[$i] = $labels[$i];
144 144
 		}
145 145
 		return array_combine( range( Rating::MAX_RATING, 1 ), $defaults );
Please login to merge, or discard this patch.
plugin/Modules/Html/Fields/Honeypot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	{
14 14
 		$this->builder->args = wp_parse_args( $this->builder->args, [
15 15
 			'name' => $this->builder->args['text'],
16
-		]);
16
+		] );
17 17
 		$this->builder->tag = 'input';
18 18
 		$this->mergeFieldArgs();
19 19
 		return $this->builder->getOpeningTag();
Please login to merge, or discard this patch.
plugin/Handlers/EnqueueAdminAssets.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			glsr()->version,
45 45
 			true
46 46
 		);
47
-		if( !empty( $this->pointers )) {
47
+		if( !empty($this->pointers) ) {
48 48
 			wp_enqueue_style( 'wp-pointer' );
49 49
 			wp_enqueue_script( 'wp-pointer' );
50 50
 		}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		$dependencies = apply_filters( 'site-reviews/enqueue/admin/dependencies', [] );
85 85
 		$dependencies = array_merge( $dependencies, [
86 86
 			'jquery', 'jquery-ui-sortable', 'underscore', 'wp-util',
87
-		]);
87
+		] );
88 88
 		return $dependencies;
89 89
 	}
90 90
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		$generatedPointers = [];
115 115
 		foreach( $pointers as $pointer ) {
116 116
 			if( $pointer['screen'] != glsr_current_screen()->id )continue;
117
-			if( in_array( $pointer['id'], $dismissedPointers ))continue;
117
+			if( in_array( $pointer['id'], $dismissedPointers ) )continue;
118 118
 			$generatedPointers[] = $this->generatePointer( $pointer );
119 119
 		}
120 120
 		$this->pointers = $generatedPointers;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	protected function isCurrentScreen()
127 127
 	{
128 128
 		$screen = glsr_current_screen();
129
-		return $screen && ( $screen->post_type == Application::POST_TYPE
129
+		return $screen && ($screen->post_type == Application::POST_TYPE
130 130
 			|| $screen->base == 'post'
131 131
 			|| $screen->id == 'dashboard'
132 132
 			|| $screen->id == 'widgets'
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	{
141 141
 		$variables = [];
142 142
 		foreach( glsr()->mceShortcodes as $tag => $args ) {
143
-			if( empty( $args['required'] ))continue;
143
+			if( empty($args['required']) )continue;
144 144
 			$variables[$tag] = $args['required'];
145 145
 		}
146 146
 		return $variables;
Please login to merge, or discard this patch.
autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 defined( 'WPINC' ) || die;
4 4
 
5
-require_once( ABSPATH.WPINC.'/class-phpass.php' );
5
+require_once(ABSPATH.WPINC.'/class-phpass.php');
6 6
 
7 7
 spl_autoload_register( function( $className ) {
8 8
 	$namespaces = [
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 	foreach( $namespaces as $prefix => $baseDir ) {
17 17
 		$len = strlen( $prefix );
18 18
 		if( strncmp( $prefix, $className, $len ) !== 0 )continue;
19
-		$file = $baseDir.str_replace( '\\', '/', substr( $className, $len )).'.php';
20
-		if( !file_exists( $file ))continue;
19
+		$file = $baseDir.str_replace( '\\', '/', substr( $className, $len ) ).'.php';
20
+		if( !file_exists( $file ) )continue;
21 21
 		require $file;
22 22
 		break;
23 23
 	}
Please login to merge, or discard this patch.
plugin/Controllers/PublicController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	public function routerSubmitReview( array $request )
51 51
 	{
52 52
 		$validated = glsr( ValidateReview::class )->validate( $request );
53
-		if( !empty( $validated->error ) || $validated->recaptchaIsUnset )return;
54
-		$this->execute( new CreateReview( $validated->request ));
53
+		if( !empty($validated->error) || $validated->recaptchaIsUnset )return;
54
+		$this->execute( new CreateReview( $validated->request ) );
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
plugin/Modules/Session.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function __construct()
36 36
 	{
37
-		if( $cookieId = filter_input( INPUT_COOKIE, static::SESSION_COOKIE )) {
38
-			$cookie = explode( '||', stripslashes( $cookieId ));
37
+		if( $cookieId = filter_input( INPUT_COOKIE, static::SESSION_COOKIE ) ) {
38
+			$cookie = explode( '||', stripslashes( $cookieId ) );
39 39
 			$this->sessionId = preg_replace( '/[^A-Za-z0-9_]/', '', $cookie[0] );
40 40
 			$this->expiryTimestamp = absint( $cookie[1] );
41 41
 			$this->expiryTimestampReset = absint( $cookie[2] );
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public function deleteExpiredSessions( $limit = 1000 )
77 77
 	{
78
-		if( $expiredSessions = implode( "','", $this->getExpiredSessions( $limit ))) {
78
+		if( $expiredSessions = implode( "','", $this->getExpiredSessions( $limit ) ) ) {
79 79
 			glsr( SqlQueries::class )->deleteExpiredSessions( $expiredSessions );
80 80
 		}
81 81
 	}
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 	public function get( $key, $fallback = '', $unset = false )
90 90
 	{
91 91
 		$key = sanitize_key( $key );
92
-		$value = isset( $this->sessionData[$key] )
92
+		$value = isset($this->sessionData[$key])
93 93
 			? maybe_unserialize( $this->sessionData[$key] )
94 94
 			: $fallback;
95
-		if( isset( $this->sessionData[$key] ) && $unset ) {
96
-			unset( $this->sessionData[$key] );
95
+		if( isset($this->sessionData[$key]) && $unset ) {
96
+			unset($this->sessionData[$key]);
97 97
 			$this->updateSession();
98 98
 		}
99 99
 		return $value;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	protected function deleteSession()
128 128
 	{
129 129
 		delete_option( $this->getSessionId() );
130
-		delete_option( $this->getSessionId( 'expires' ));
130
+		delete_option( $this->getSessionId( 'expires' ) );
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	protected function generateSessionId()
137 137
 	{
138
-		return md5(( new PasswordHash( 8, false ))->get_random_bytes( 32 ));
138
+		return md5( (new PasswordHash( 8, false ))->get_random_bytes( 32 ) );
139 139
 	}
140 140
 
141 141
 	/**
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
 	protected function getExpiredSessions( $limit )
146 146
 	{
147 147
 		$expiredSessions = [];
148
-		$sessions = glsr( SqlQueries::class )->getExpiredSessions( static::SESSION_COOKIE, absint( $limit ));
149
-		if( !empty( $sessions )) {
148
+		$sessions = glsr( SqlQueries::class )->getExpiredSessions( static::SESSION_COOKIE, absint( $limit ) );
149
+		if( !empty($sessions) ) {
150 150
 			$now = time();
151 151
 			foreach( $sessions as $session ) {
152 152
 				if( $now <= $session->expiration )continue;
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	protected function getSessionId( $separator = '' )
165 165
 	{
166
-		return implode( '_', array_filter( [static::SESSION_COOKIE, $separator, $this->sessionId] ));
166
+		return implode( '_', array_filter( [static::SESSION_COOKIE, $separator, $this->sessionId] ) );
167 167
 	}
168 168
 
169 169
 	/**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	{
195 195
 		if( headers_sent() )return;
196 196
 		$cookie = $this->sessionId.'||'.$this->expiryTimestamp.'||'.$this->expiryTimestampReset;
197
-		$cookiePath = preg_replace( '|https?://[^/]+|i', '', trailingslashit( (string)get_option( 'home' )));
197
+		$cookiePath = preg_replace( '|https?://[^/]+|i', '', trailingslashit( (string)get_option( 'home' ) ) );
198 198
 		setcookie( static::SESSION_COOKIE, $cookie, $this->expiryTimestamp, $cookiePath );
199 199
 	}
200 200
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	protected function updateSession()
214 214
 	{
215
-		if( false === get_option( $this->getSessionId() )) {
215
+		if( false === get_option( $this->getSessionId() ) ) {
216 216
 			return $this->createSession();
217 217
 		}
218 218
 		update_option( $this->getSessionId(), $this->sessionData, false );
Please login to merge, or discard this patch.
plugin/Modules/Blacklist.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
 	 */
12 12
 	public function isBlacklisted( array $review )
13 13
 	{
14
-		$target = implode( "\n", array_filter([
14
+		$target = implode( "\n", array_filter( [
15 15
 			$review['name'],
16 16
 			$review['content'],
17 17
 			$review['email'],
18 18
 			$review['ip_address'],
19 19
 			$review['title'],
20
-		]));
21
-		return (bool) apply_filters( 'site-reviews/blacklist/is-blacklisted',
20
+		] ) );
21
+		return (bool)apply_filters( 'site-reviews/blacklist/is-blacklisted',
22 22
 			$this->check( $target ),
23 23
 			$review
24 24
 		);
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	protected function check( $target )
32 32
 	{
33
-		$blacklist = trim( glsr( OptionManager::class )->get( 'settings.submissions.blacklist.entries' ));
34
-		if( empty( $blacklist )) {
33
+		$blacklist = trim( glsr( OptionManager::class )->get( 'settings.submissions.blacklist.entries' ) );
34
+		if( empty($blacklist) ) {
35 35
 			return false;
36 36
 		}
37 37
 		$lines = explode( "\n", $blacklist );
38
-		foreach( (array) $lines as $line ) {
38
+		foreach( (array)$lines as $line ) {
39 39
 			$line = trim( $line );
40
-			if( empty( $line ) || 256 < strlen( $line ))continue;
41
-			$pattern = sprintf( '#%s#i', preg_quote( $line, '#' ));
42
-			if( preg_match( $pattern, $target )) {
40
+			if( empty($line) || 256 < strlen( $line ) )continue;
41
+			$pattern = sprintf( '#%s#i', preg_quote( $line, '#' ) );
42
+			if( preg_match( $pattern, $target ) ) {
43 43
 				return true;
44 44
 			}
45 45
 		}
Please login to merge, or discard this patch.
plugin/Commands/CreateReview.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
 	public function __construct( $input )
28 28
 	{
29 29
 		$this->request = $input;
30
-		$this->ajax_request = isset( $input['ajax_request'] );
30
+		$this->ajax_request = isset($input['ajax_request']);
31 31
 		$this->assigned_to = $this->getNumeric( 'assign_to' );
32
-		$this->author = sanitize_text_field( $this->get( 'name' ));
33
-		$this->avatar = get_avatar_url( $this->get( 'email' ));
34
-		$this->blacklisted = isset( $input['blacklisted'] );
35
-		$this->category = sanitize_key( $this->get( 'category' ));
36
-		$this->content = sanitize_textarea_field( $this->get( 'content' ));
32
+		$this->author = sanitize_text_field( $this->get( 'name' ) );
33
+		$this->avatar = get_avatar_url( $this->get( 'email' ) );
34
+		$this->blacklisted = isset($input['blacklisted']);
35
+		$this->category = sanitize_key( $this->get( 'category' ) );
36
+		$this->content = sanitize_textarea_field( $this->get( 'content' ) );
37 37
 		$this->custom = $this->getCustom();
38
-		$this->email = sanitize_email( $this->get( 'email' ));
39
-		$this->form_id = sanitize_key( $this->get( 'form_id' ));
38
+		$this->email = sanitize_email( $this->get( 'email' ) );
39
+		$this->form_id = sanitize_key( $this->get( 'form_id' ) );
40 40
 		$this->ip_address = $this->get( 'ip_address' );
41
-		$this->rating = intval( $this->get( 'rating' ));
41
+		$this->rating = intval( $this->get( 'rating' ) );
42 42
 		$this->referrer = $this->get( 'referrer' );
43
-		$this->terms = isset( $input['terms'] );
44
-		$this->title = sanitize_text_field( $this->get( 'title' ));
43
+		$this->terms = isset($input['terms']);
44
+		$this->title = sanitize_text_field( $this->get( 'title' ) );
45 45
 	}
46 46
 
47 47
 	/**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	protected function get( $key )
52 52
 	{
53
-		return isset( $this->request[$key] )
53
+		return isset($this->request[$key])
54 54
 			? (string)$this->request[$key]
55 55
 			: '';
56 56
 	}
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		];
68 68
 		$custom = $this->request;
69 69
 		foreach( $unset as $value ) {
70
-			unset( $custom[$value] );
70
+			unset($custom[$value]);
71 71
 		}
72 72
 		return $custom;
73 73
 	}
Please login to merge, or discard this patch.
plugin/Modules/Html/Builder.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	{
56 56
 		$instance = new static;
57 57
 		$instance->setTagFromMethod( $method );
58
-		call_user_func_array( [$instance, 'normalize'], $args += ['',''] );
58
+		call_user_func_array( [$instance, 'normalize'], $args += ['', ''] );
59 59
 		$tags = array_merge( static::TAGS_FORM, static::TAGS_SINGLE, static::TAGS_STRUCTURE, static::TAGS_TEXT );
60 60
 		$generatedTag = in_array( $instance->tag, $tags )
61 61
 			? $instance->buildTag()
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 			'render' => 'is_bool',
79 79
 			'tag' => 'is_string',
80 80
 		];
81
-		if( !isset( $properties[$property] )
82
-			|| empty( array_filter( [$value], $properties[$property] ))
81
+		if( !isset($properties[$property])
82
+			|| empty(array_filter( [$value], $properties[$property] ))
83 83
 		)return;
84 84
 		$this->$property = $value;
85 85
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function getOpeningTag()
99 99
 	{
100
-		$attributes = glsr( Attributes::class )->{$this->tag}( $this->args )->toString();
100
+		$attributes = glsr( Attributes::class )->{$this->tag}($this->args)->toString();
101 101
 		return '<'.trim( $this->tag.' '.$attributes ).'>';
102 102
 	}
103 103
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	protected function buildCustomField()
108 108
 	{
109 109
 		$className = $this->getCustomFieldClassName();
110
-		if( class_exists( $className )) {
110
+		if( class_exists( $className ) ) {
111 111
 			return (new $className( $this ))->build();
112 112
 		}
113 113
 		glsr_log()->error( 'Field missing: '.$className );
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	protected function buildDefaultTag( $text = '' )
120 120
 	{
121
-		if( empty( $text )) {
121
+		if( empty($text) ) {
122 122
 			$text = $this->args['text'];
123 123
 		}
124 124
 		return $this->getOpeningTag().$text.$this->getClosingTag();
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	protected function buildFieldDescription()
131 131
 	{
132
-		if( empty( $this->args['description'] ))return;
132
+		if( empty($this->args['description']) )return;
133 133
 		if( $this->args['is_widget'] ) {
134 134
 			return $this->small( $this->args['description'] );
135 135
 		}
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	protected function buildFormInput()
143 143
 	{
144
-		if( !in_array( $this->args['type'], ['checkbox', 'radio'] )) {
145
-			if( isset( $this->args['multiple'] )) {
146
-				$this->args['name'].= '[]';
144
+		if( !in_array( $this->args['type'], ['checkbox', 'radio'] ) ) {
145
+			if( isset($this->args['multiple']) ) {
146
+				$this->args['name'] .= '[]';
147 147
 			}
148 148
 			return $this->buildFormLabel().$this->getOpeningTag();
149 149
 		}
150
-		return empty( $this->args['options'] )
150
+		return empty($this->args['options'])
151 151
 			? $this->buildFormInputChoice()
152 152
 			: $this->buildFormInputMultiChoice();
153 153
 	}
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
 	 */
158 158
 	protected function buildFormInputChoice()
159 159
 	{
160
-		$labelText = !empty( $this->args['text'] )
160
+		$labelText = !empty($this->args['text'])
161 161
 			? $this->args['text']
162 162
 			: $this->args['label'];
163 163
 		return $this->label( $this->getOpeningTag().' '.$labelText, [
164 164
 			'class' => 'glsr-'.$this->args['type'].'-label',
165 165
 			'for' => $this->args['id'],
166
-		]);
166
+		] );
167 167
 	}
168 168
 
169 169
 	/**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	protected function buildFormInputMultiChoice()
173 173
 	{
174 174
 		if( $this->args['type'] == 'checkbox' ) {
175
-			$this->args['name'].= '[]';
175
+			$this->args['name'] .= '[]';
176 176
 		}
177 177
 		$options = array_reduce( array_keys( $this->args['options'] ), function( $carry, $key ) {
178 178
 			return $carry.$this->li( $this->{$this->args['type']}([
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
 				'name' => $this->args['name'],
181 181
 				'text' => $this->args['options'][$key],
182 182
 				'value' => $key,
183
-			]));
183
+			]) );
184 184
 		});
185 185
 		return $this->ul( $options, [
186 186
 			'class' => $this->args['class'],
187 187
 			'id' => $this->args['id'],
188
-		]);
188
+		] );
189 189
 	}
190 190
 
191 191
 	/**
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
 	 */
194 194
 	protected function buildFormLabel()
195 195
 	{
196
-		if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' )return;
197
-		return $this->label([
196
+		if( empty($this->args['label']) || $this->args['type'] == 'hidden' )return;
197
+		return $this->label( [
198 198
 			'for' => $this->args['id'],
199 199
 			'text' => $this->args['label'],
200
-		]);
200
+		] );
201 201
 	}
202 202
 
203 203
 	/**
@@ -214,11 +214,11 @@  discard block
 block discarded – undo
214 214
 	protected function buildFormSelectOptions()
215 215
 	{
216 216
 		return array_reduce( array_keys( $this->args['options'] ), function( $carry, $key ) {
217
-			return $carry.$this->option([
217
+			return $carry.$this->option( [
218 218
 				'selected' => $this->args['value'] == $key,
219 219
 				'text' => $this->args['options'][$key],
220 220
 				'value' => $key,
221
-			]);
221
+			] );
222 222
 		});
223 223
 	}
224 224
 
@@ -236,10 +236,10 @@  discard block
 block discarded – undo
236 236
 	protected function buildTag()
237 237
 	{
238 238
 		$this->mergeArgsWithRequiredDefaults();
239
-		if( in_array( $this->tag, static::TAGS_SINGLE )) {
239
+		if( in_array( $this->tag, static::TAGS_SINGLE ) ) {
240 240
 			return $this->getOpeningTag();
241 241
 		}
242
-		if( !in_array( $this->tag, static::TAGS_FORM )) {
242
+		if( !in_array( $this->tag, static::TAGS_FORM ) ) {
243 243
 			return $this->buildDefaultTag();
244 244
 		}
245 245
 		return call_user_func( [$this, 'buildForm'.ucfirst( $this->tag )] ).$this->buildFieldDescription();
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	protected function mergeArgsWithRequiredDefaults()
260 260
 	{
261 261
 		$className = $this->getCustomFieldClassName();
262
-		if( class_exists( $className )) {
262
+		if( class_exists( $className ) ) {
263 263
 			$this->args = array_merge(
264 264
 				wp_parse_args( $this->args, $className::defaults() ),
265 265
 				$className::required()
@@ -274,13 +274,13 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	protected function normalize( ...$params )
276 276
 	{
277
-		if( is_string( $params[0] ) || is_numeric( $params[0] )) {
277
+		if( is_string( $params[0] ) || is_numeric( $params[0] ) ) {
278 278
 			$this->setNameOrTextAttributeForTag( $params[0] );
279 279
 		}
280
-		if( is_array( $params[0] )) {
280
+		if( is_array( $params[0] ) ) {
281 281
 			$this->args += $params[0];
282 282
 		}
283
-		else if( is_array( $params[1] )) {
283
+		else if( is_array( $params[1] ) ) {
284 284
 			$this->args += $params[1];
285 285
 		}
286 286
 	}
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 	protected function setTagFromMethod( $method )
305 305
 	{
306 306
 		$this->tag = strtolower( $method );
307
-		if( in_array( $this->tag, static::INPUT_TYPES )) {
307
+		if( in_array( $this->tag, static::INPUT_TYPES ) ) {
308 308
 			$this->args['type'] = $this->tag;
309 309
 			$this->tag = 'input';
310 310
 		}
Please login to merge, or discard this patch.