Passed
Push — master ( 203c84...bd5512 )
by Paul
04:35
created
plugin/Modules/Validator/ValidateReview.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function validateRequest( array $request )
57 57
 	{
58
-		if( !$this->isRequestValid( $request )) {
58
+		if( !$this->isRequestValid( $request ) ) {
59 59
 			$this->error = __( 'Please fix the submission errors.', 'site-reviews' );
60 60
 			return $request;
61 61
 		}
62
-		if( empty( $request['title'] )) {
62
+		if( empty($request['title']) ) {
63 63
 			$request['title'] = __( 'No Title', 'site-reviews' );
64 64
 		}
65 65
 		return array_merge( glsr( ValidateReviewDefaults::class )->defaults(), $request );
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
 		$rules = array_intersect_key(
74 74
 			apply_filters( 'site-reviews/validation/rules', static::VALIDATION_RULES ),
75 75
 			array_flip( array_merge(
76
-				['rating','terms'],
76
+				['rating', 'terms'],
77 77
 				glsr( OptionManager::class )->get( 'settings.submissions.required', [] )
78
-			))
78
+			) )
79 79
 		);
80
-		$excluded = isset( $request['excluded'] )
80
+		$excluded = isset($request['excluded'])
81 81
 			? json_decode( $request['excluded'] )
82 82
 			: [];
83
-		return array_diff_key( $rules, array_flip( $excluded ));
83
+		return array_diff_key( $rules, array_flip( $excluded ) );
84 84
 	}
85 85
 
86 86
 	/**
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
 			return true;
94 94
 		}
95 95
 		$recaptchaResponse = filter_input( INPUT_POST, 'g-recaptcha-response' );
96
-		if( empty( $recaptchaResponse )) {
96
+		if( empty($recaptchaResponse) ) {
97 97
 			return null; //if response is empty we need to return null
98 98
 		}
99 99
 		if( $integration == 'custom' ) {
100 100
 			return $this->isRecaptchaValid( $recaptchaResponse );
101 101
 		}
102 102
 		if( $integration == 'invisible-recaptcha' ) {
103
-			return boolval( apply_filters( 'google_invre_is_valid_request_filter', true ));
103
+			return boolval( apply_filters( 'google_invre_is_valid_request_filter', true ) );
104 104
 		}
105 105
 		return false;
106 106
 	}
@@ -110,17 +110,17 @@  discard block
 block discarded – undo
110 110
 	 */
111 111
 	protected function isRecaptchaValid( $recaptchaResponse )
112 112
 	{
113
-		$endpoint = add_query_arg([
113
+		$endpoint = add_query_arg( [
114 114
 			'remoteip' => glsr( Helper::class )->getIpAddress(),
115 115
 			'response' => $recaptchaResponse,
116 116
 			'secret' => glsr( OptionManager::class )->get( 'settings.submissions.recaptcha.secret' ),
117 117
 		], 'https://www.google.com/recaptcha/api/siteverify' );
118
-		if( is_wp_error( $response = wp_remote_get( $endpoint ))) {
118
+		if( is_wp_error( $response = wp_remote_get( $endpoint ) ) ) {
119 119
 			glsr_log()->error( $response->get_error_message() );
120 120
 			return false;
121 121
 		}
122
-		$response = json_decode( wp_remote_retrieve_body( $response ));
123
-		if( !empty( $response->success )) {
122
+		$response = json_decode( wp_remote_retrieve_body( $response ) );
123
+		if( !empty($response->success) ) {
124 124
 			return boolval( $response->success );
125 125
 		}
126 126
 		$errorCodes = [
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	{
144 144
 		$rules = $this->getValidationRules( $request );
145 145
 		$errors = glsr( Validator::class )->validate( $request, $rules );
146
-		if( empty( $errors )) {
146
+		if( empty($errors) ) {
147 147
 			return true;
148 148
 		}
149 149
 		$this->setSessionValues( 'errors', $errors );
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	protected function setSessionValues( $type, $value, $loggedMessage = '' )
161 161
 	{
162 162
 		glsr( Session::class )->set( $this->form_id.$type, $value );
163
-		if( !empty( $loggedMessage )) {
163
+		if( !empty($loggedMessage) ) {
164 164
 			glsr_log()->warning( $loggedMessage );
165 165
 			glsr_log()->warning( $this->request );
166 166
 		}
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	protected function validateAkismet()
173 173
 	{
174
-		if( !empty( $this->error ))return;
175
-		if( !glsr( Akismet::class )->isSpam( $this->request ))return;
174
+		if( !empty($this->error) )return;
175
+		if( !glsr( Akismet::class )->isSpam( $this->request ) )return;
176 176
 		$this->setSessionValues( 'errors', [], 'Akismet caught a spam submission:' );
177 177
 		$this->error = __( 'Your review cannot be submitted at this time. Please try again later.', 'site-reviews' );
178 178
 	}
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 	 */
183 183
 	protected function validateBlacklist()
184 184
 	{
185
-		if( !empty( $this->error ))return;
186
-		if( !glsr( Blacklist::class )->isBlacklisted( $this->request ))return;
185
+		if( !empty($this->error) )return;
186
+		if( !glsr( Blacklist::class )->isBlacklisted( $this->request ) )return;
187 187
 		$blacklistAction = glsr( OptionManager::class )->get( 'settings.submissions.blacklist.action' );
188 188
 		if( $blacklistAction == 'unapprove' ) {
189 189
 			$this->request['blacklisted'] = true;
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	 */
200 200
 	protected function validateCustom()
201 201
 	{
202
-		if( !empty( $this->error ))return;
202
+		if( !empty($this->error) )return;
203 203
 		$validated = apply_filters( 'site-reviews/validate/review/submission', true, $this->request );
204 204
 		if( $validated === true )return;
205 205
 		$this->setSessionValues( 'errors', [] );
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
 	 */
215 215
 	protected function validateHoneyPot()
216 216
 	{
217
-		if( !empty( $this->error ))return;
218
-		if( empty( $this->request['gotcha'] ))return;
217
+		if( !empty($this->error) )return;
218
+		if( empty($this->request['gotcha']) )return;
219 219
 		$this->setSessionValues( 'errors', [], 'The Honeypot caught a bad submission:' );
220 220
 		$this->error = __( 'The review submission failed. Please notify the site administrator.', 'site-reviews' );
221 221
 	}
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	protected function validateRecaptcha()
227 227
 	{
228
-		if( !empty( $this->error ))return;
228
+		if( !empty($this->error) )return;
229 229
 		$isValid = $this->isRecaptchaResponseValid();
230
-		if( is_null( $isValid )) {
230
+		if( is_null( $isValid ) ) {
231 231
 			$this->setSessionValues( 'recaptcha', true );
232 232
 			$this->recaptchaIsUnset = true;
233 233
 		}
Please login to merge, or discard this patch.
Braces   +27 added lines, -9 removed lines patch added patch discarded remove patch
@@ -171,8 +171,12 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	protected function validateAkismet()
173 173
 	{
174
-		if( !empty( $this->error ))return;
175
-		if( !glsr( Akismet::class )->isSpam( $this->request ))return;
174
+		if( !empty( $this->error )) {
175
+			return;
176
+		}
177
+		if( !glsr( Akismet::class )->isSpam( $this->request )) {
178
+			return;
179
+		}
176 180
 		$this->setSessionValues( 'errors', [], 'Akismet caught a spam submission:' );
177 181
 		$this->error = __( 'Your review cannot be submitted at this time. Please try again later.', 'site-reviews' );
178 182
 	}
@@ -182,8 +186,12 @@  discard block
 block discarded – undo
182 186
 	 */
183 187
 	protected function validateBlacklist()
184 188
 	{
185
-		if( !empty( $this->error ))return;
186
-		if( !glsr( Blacklist::class )->isBlacklisted( $this->request ))return;
189
+		if( !empty( $this->error )) {
190
+			return;
191
+		}
192
+		if( !glsr( Blacklist::class )->isBlacklisted( $this->request )) {
193
+			return;
194
+		}
187 195
 		$blacklistAction = glsr( OptionManager::class )->get( 'settings.submissions.blacklist.action' );
188 196
 		if( $blacklistAction == 'unapprove' ) {
189 197
 			$this->request['blacklisted'] = true;
@@ -199,9 +207,13 @@  discard block
 block discarded – undo
199 207
 	 */
200 208
 	protected function validateCustom()
201 209
 	{
202
-		if( !empty( $this->error ))return;
210
+		if( !empty( $this->error )) {
211
+			return;
212
+		}
203 213
 		$validated = apply_filters( 'site-reviews/validate/review/submission', true, $this->request );
204
-		if( $validated === true )return;
214
+		if( $validated === true ) {
215
+			return;
216
+		}
205 217
 		$this->setSessionValues( 'errors', [] );
206 218
 		$this->setSessionValues( 'values', $this->request );
207 219
 		$this->error = is_string( $validated )
@@ -214,8 +226,12 @@  discard block
 block discarded – undo
214 226
 	 */
215 227
 	protected function validateHoneyPot()
216 228
 	{
217
-		if( !empty( $this->error ))return;
218
-		if( empty( $this->request['gotcha'] ))return;
229
+		if( !empty( $this->error )) {
230
+			return;
231
+		}
232
+		if( empty( $this->request['gotcha'] )) {
233
+			return;
234
+		}
219 235
 		$this->setSessionValues( 'errors', [], 'The Honeypot caught a bad submission:' );
220 236
 		$this->error = __( 'The review submission failed. Please notify the site administrator.', 'site-reviews' );
221 237
 	}
@@ -225,7 +241,9 @@  discard block
 block discarded – undo
225 241
 	 */
226 242
 	protected function validateRecaptcha()
227 243
 	{
228
-		if( !empty( $this->error ))return;
244
+		if( !empty( $this->error )) {
245
+			return;
246
+		}
229 247
 		$isValid = $this->isRecaptchaResponseValid();
230 248
 		if( is_null( $isValid )) {
231 249
 			$this->setSessionValues( 'recaptcha', true );
Please login to merge, or discard this patch.
plugin/Database/Cache.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 	const EXPIRY_TIME = WEEK_IN_SECONDS;
11 11
 
12 12
 	/**
13
- 	 * @return array
13
+	 * @return array
14 14
 	 */
15 15
 	public function getCloudflareIps()
16 16
 	{
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 			$ipAddresses = array_fill_keys( ['v4', 'v6'], [] );
20 20
 			foreach( array_keys( $ipAddresses ) as $version ) {
21 21
 				$response = wp_remote_get( 'https://www.cloudflare.com/ips-'.$version );
22
-				if( is_wp_error( $response )) {
22
+				if( is_wp_error( $response ) ) {
23 23
 					glsr_log()->error( $response->get_error_message() );
24 24
 					continue;
25 25
 				}
26
-				$ipAddresses[$version] = array_filter( explode( PHP_EOL, wp_remote_retrieve_body( $response )));
26
+				$ipAddresses[$version] = array_filter( explode( PHP_EOL, wp_remote_retrieve_body( $response ) ) );
27 27
 			}
28 28
 			set_transient( Application::ID.'_cloudflare_ips', $ipAddresses, static::EXPIRY_TIME );
29 29
 		}
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		if( $test === false ) {
58 58
 			$response = wp_remote_post( 'https://api.wordpress.org/stats/php/1.0/' );
59 59
 			$test = !is_wp_error( $response )
60
-				&& in_array( $response['response']['code'], range( 200, 299 ))
60
+				&& in_array( $response['response']['code'], range( 200, 299 ) )
61 61
 				? 'Works'
62 62
 				: 'Does not work';
63 63
 			set_transient( Application::ID.'_remote_post_test', $test, static::EXPIRY_TIME );
Please login to merge, or discard this patch.
plugin/Widgets/Widget.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 	public function __construct( $idBase, $name, $values )
16 16
 	{
17 17
 		$controlOptions = $widgetOptions = [];
18
-		if( isset( $values['class'] )) {
18
+		if( isset($values['class']) ) {
19 19
 			$widgetOptions['classname'] = $values['class'];
20 20
 		}
21
-		if( isset( $values['description'] )) {
21
+		if( isset($values['description']) ) {
22 22
 			$widgetOptions['description'] = $values['description'];
23 23
 		}
24
-		if( isset( $values['width'] )) {
24
+		if( isset($values['width']) ) {
25 25
 			$controlOptions['width'] = $values['width'];
26 26
 		}
27 27
 		parent::__construct( $idBase, $name, $widgetOptions, $controlOptions );
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 	protected function renderField( $tag, array $args = [] )
35 35
 	{
36 36
 		$args = $this->normalizeFieldAttributes( $tag, $args );
37
-		$field = glsr( Html::class )->build( ['is_widget' => true] )->{$tag}( $args['name'], $args );
37
+		$field = glsr( Html::class )->build( ['is_widget' => true] )->{$tag}($args['name'], $args);
38 38
 		echo glsr( Html::class )->build( ['is_widget' => true] )->div( $field, [
39 39
 			'class' => 'glsr-field',
40
-		]);
40
+		] );
41 41
 	}
42 42
 
43 43
 	/**
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	protected function normalizeFieldAttributes( $tag, array $args )
48 48
 	{
49
-		if( empty( $args['value'] )) {
49
+		if( empty($args['value']) ) {
50 50
 			$args['value'] = $this->widgetArgs[$args['name']];
51 51
 		}
52
-		if( empty( $this->widgetArgs['options'] ) && in_array( $tag, ['checkbox', 'radio'] )) {
52
+		if( empty($this->widgetArgs['options']) && in_array( $tag, ['checkbox', 'radio'] ) ) {
53 53
 			$args['checked'] = in_array( $args['value'], (array)$this->widgetArgs[$args['name']] );
54 54
 		}
55 55
 		$args['id'] = $this->get_field_id( $args['name'] );
Please login to merge, or discard this patch.
plugin/Modules/Html/Builder.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,9 @@  discard block
 block discarded – undo
87 87
 		];
88 88
 		if( !isset( $properties[$property] )
89 89
 			|| empty( array_filter( [$value], $properties[$property] ))
90
-		)return;
90
+		) {
91
+			return;
92
+		}
91 93
 		$this->$property = $value;
92 94
 	}
93 95
 
@@ -137,7 +139,9 @@  discard block
 block discarded – undo
137 139
 	 */
138 140
 	protected function buildFieldDescription()
139 141
 	{
140
-		if( empty( $this->args['description'] ))return;
142
+		if( empty( $this->args['description'] )) {
143
+			return;
144
+		}
141 145
 		if( !empty( $this->globals['is_widget'] )) {
142 146
 			return $this->small( $this->args['description'] );
143 147
 		}
@@ -186,7 +190,9 @@  discard block
 block discarded – undo
186 190
 	 */
187 191
 	protected function buildFormLabel()
188 192
 	{
189
-		if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' )return;
193
+		if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' ) {
194
+			return;
195
+		}
190 196
 		return $this->label([
191 197
 			'for' => $this->args['id'],
192 198
 			'text' => $this->args['label'],
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 	 */
60 60
 	public function __call( $method, $args )
61 61
 	{
62
-		$instance = new static( $this->globals );
62
+		$instance = new static($this->globals);
63 63
 		$instance->setTagFromMethod( $method );
64
-		call_user_func_array( [$instance, 'normalize'], $args += ['',''] );
64
+		call_user_func_array( [$instance, 'normalize'], $args += ['', ''] );
65 65
 		$tags = array_merge( static::TAGS_FORM, static::TAGS_STRUCTURE, static::TAGS_TEXT );
66 66
 		$generatedTag = in_array( $instance->tag, $tags )
67 67
 			? $instance->buildTag()
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 			'render' => 'is_bool',
86 86
 			'tag' => 'is_string',
87 87
 		];
88
-		if( !isset( $properties[$property] )
89
-			|| empty( array_filter( [$value], $properties[$property] ))
88
+		if( !isset($properties[$property])
89
+			|| empty(array_filter( [$value], $properties[$property] ))
90 90
 		)return;
91 91
 		$this->$property = $value;
92 92
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 */
105 105
 	public function getOpeningTag()
106 106
 	{
107
-		$attributes = glsr( Attributes::class )->{$this->tag}( $this->args )->toString();
107
+		$attributes = glsr( Attributes::class )->{$this->tag}($this->args)->toString();
108 108
 		return '<'.trim( $this->tag.' '.$attributes ).'>';
109 109
 	}
110 110
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	protected function buildCustomField()
115 115
 	{
116 116
 		$className = glsr( Helper::class )->buildClassName( $this->tag, __NAMESPACE__.'\Fields' );
117
-		if( !class_exists( $className )) {
117
+		if( !class_exists( $className ) ) {
118 118
 			glsr_log()->error( 'Field missing: '.$className );
119 119
 			return;
120 120
 		}
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	protected function buildDefaultTag( $text = '' )
128 128
 	{
129
-		if( empty( $text )) {
129
+		if( empty($text) ) {
130 130
 			$text = $this->args['text'];
131 131
 		}
132 132
 		return $this->getOpeningTag().$text.$this->getClosingTag();
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 	 */
138 138
 	protected function buildFieldDescription()
139 139
 	{
140
-		if( empty( $this->args['description'] ))return;
141
-		if( !empty( $this->globals['is_widget'] )) {
140
+		if( empty($this->args['description']) )return;
141
+		if( !empty($this->globals['is_widget']) ) {
142 142
 			return $this->small( $this->args['description'] );
143 143
 		}
144 144
 		return $this->p( $this->args['description'], ['class' => 'description'] );
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	protected function buildFormInput()
151 151
 	{
152
-		if( !in_array( $this->args['type'], ['checkbox', 'radio'] )) {
152
+		if( !in_array( $this->args['type'], ['checkbox', 'radio'] ) ) {
153 153
 			return $this->buildFormLabel().$this->getOpeningTag();
154 154
 		}
155
-		return empty( $this->args['options'] )
155
+		return empty($this->args['options'])
156 156
 			? $this->buildFormInputChoice()
157 157
 			: $this->buildFormInputMultiChoice();
158 158
 	}
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	protected function buildFormInputMultiChoice()
172 172
 	{
173 173
 		if( $this->args['type'] == 'checkbox' ) {
174
-			$this->args['name'].= '[]';
174
+			$this->args['name'] .= '[]';
175 175
 		}
176 176
 		$options = array_reduce( array_keys( $this->args['options'] ), function( $carry, $key ) {
177 177
 			return $carry.$this->li( $this->{$this->args['type']}([
@@ -179,12 +179,12 @@  discard block
 block discarded – undo
179 179
 				'name' => $this->args['name'],
180 180
 				'text' => $this->args['options'][$key],
181 181
 				'value' => $key,
182
-			]));
182
+			]) );
183 183
 		});
184 184
 		return $this->ul( $options, [
185 185
 			'class' => $this->args['class'],
186 186
 			'id' => $this->args['id'],
187
-		]);
187
+		] );
188 188
 	}
189 189
 
190 190
 	/**
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
 	 */
193 193
 	protected function buildFormLabel()
194 194
 	{
195
-		if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' )return;
196
-		return $this->label([
195
+		if( empty($this->args['label']) || $this->args['type'] == 'hidden' )return;
196
+		return $this->label( [
197 197
 			'for' => $this->args['id'],
198 198
 			'text' => $this->args['label'],
199
-		]);
199
+		] );
200 200
 	}
201 201
 
202 202
 	/**
@@ -213,11 +213,11 @@  discard block
 block discarded – undo
213 213
 	protected function buildFormSelectOptions()
214 214
 	{
215 215
 		return array_reduce( array_keys( $this->args['options'] ), function( $carry, $key ) {
216
-			return $carry.$this->option([
216
+			return $carry.$this->option( [
217 217
 				'selected' => $this->args['value'] == $key,
218 218
 				'text' => $this->args['options'][$key],
219 219
 				'value' => $key,
220
-			]);
220
+			] );
221 221
 		});
222 222
 	}
223 223
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 	 */
235 235
 	protected function buildTag()
236 236
 	{
237
-		if( !in_array( $this->tag, static::TAGS_FORM )) {
237
+		if( !in_array( $this->tag, static::TAGS_FORM ) ) {
238 238
 			return $this->buildDefaultTag();
239 239
 		}
240 240
 		return call_user_func( [$this, 'buildForm'.ucfirst( $this->tag )] ).$this->buildFieldDescription();
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
 	 */
247 247
 	protected function normalize( ...$params )
248 248
 	{
249
-		if( is_string( $params[0] ) || is_numeric( $params[0] )) {
249
+		if( is_string( $params[0] ) || is_numeric( $params[0] ) ) {
250 250
 			$this->setNameOrTextAttributeForTag( $params[0] );
251 251
 		}
252
-		if( is_array( $params[0] )) {
252
+		if( is_array( $params[0] ) ) {
253 253
 			$this->args += $params[0];
254 254
 		}
255
-		else if( is_array( $params[1] )) {
255
+		else if( is_array( $params[1] ) ) {
256 256
 			$this->args += $params[1];
257 257
 		}
258 258
 		$this->args = glsr( BuilderDefaults::class )->merge( $this->args );
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	protected function setTagFromMethod( $method )
278 278
 	{
279 279
 		$this->tag = strtolower( $method );
280
-		if( in_array( $this->tag, static::INPUT_TYPES )) {
280
+		if( in_array( $this->tag, static::INPUT_TYPES ) ) {
281 281
 			$this->args['type'] = $this->tag;
282 282
 			$this->tag = 'input';
283 283
 		}
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
 		$defaults = wp_parse_args( $this->defaults(), [
15 15
 			'name' => $this->builder->args['text'],
16
-		]);
16
+		] );
17 17
 		$this->builder->args = wp_parse_args( $this->builder->args, $defaults );
18 18
 		$this->builder->tag = 'input';
19 19
 		return $this->builder->getOpeningTag();
Please login to merge, or discard this patch.
views/pages/addons/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 				'name' => 'tripadvisor',
13 13
 				'title' => 'Tripadvisor Reviews',
14 14
 			],
15
-		]);
15
+		] );
16 16
 		$template->render( 'partials/addons/addon', [
17 17
 			'context' => [
18 18
 				'description' => __( 'Sync your Yelp reviews and display them on your site.', 'site-reviews' ),
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 				'name' => 'yelp',
21 21
 				'title' => 'Yelp Reviews',
22 22
 			],
23
-		]);
23
+		] );
24 24
 	?>
25 25
 	</div>
26 26
 </div>
Please login to merge, or discard this patch.
views/partials/translations/plural.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 		<p>{{ data.s1 }}</p>
4 4
 		<p>{{ data.p1 }}</p>
5 5
 		<p class="row-actions">
6
-			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' );?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
6
+			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' ); ?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
7 7
 		</p>
8 8
 		<button type="button" class="toggle-row">
9 9
 			<span class="screen-reader-text"><?= __( 'Show custom translation', 'site-reviews' ); ?></span>
Please login to merge, or discard this patch.
views/partials/translations/single.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 	<td class="glsr-string-td1 column-primary">
3 3
 		<p>{{ data.s1 }}</p>
4 4
 		<p class="row-actions">
5
-			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' );?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
5
+			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' ); ?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
6 6
 		</p>
7 7
 		<button type="button" class="toggle-row">
8 8
 			<span class="screen-reader-text"><?= __( 'Show custom translation', 'site-reviews' ); ?></span>
Please login to merge, or discard this patch.
views/partials/editor/metabox-categories.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		</ul>
21 21
 	</div>
22 22
 
23
-	<?php if( current_user_can( $taxonomy->cap->edit_terms )) : ?>
23
+	<?php if( current_user_can( $taxonomy->cap->edit_terms ) ) : ?>
24 24
 	<div id="<?= $tax_name; ?>-adder" class="wp-hidden-children">
25 25
 		<a id="<?= $tax_name; ?>-add-toggle" href="#<?= $tax_name; ?>-add" class="hide-if-no-js taxonomy-add-new">
26 26
 			<?= sprintf( '+ %s', $taxonomy->labels->add_new_item ); ?>
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			<label class="screen-reader-text" for="new<?= $tax_name; ?>"><?= $taxonomy->labels->add_new_item; ?></label>
30 30
 			<input type="text" name="new<?= $tax_name; ?>" id="new<?= $tax_name; ?>" class="form-required form-input-tip" value="<?= esc_attr( $taxonomy->labels->new_item_name ); ?>" aria-required="true"/>
31 31
 			<input type="button" id="<?= $tax_name; ?>-add-submit" data-wp-lists="add:<?= $tax_name; ?>checklist:<?= $tax_name; ?>-add" class="button category-add-submit" value="<?= esc_attr( $taxonomy->labels->add_new_item ); ?>" />
32
-			<?php wp_nonce_field( 'add-' . $tax_name, '_ajax_nonce-add-' . $tax_name, false ); ?>
32
+			<?php wp_nonce_field( 'add-'.$tax_name, '_ajax_nonce-add-'.$tax_name, false ); ?>
33 33
 			<span id="<?= $tax_name; ?>-ajax-response"></span>
34 34
 		</div>
35 35
 	</div>
Please login to merge, or discard this patch.