Passed
Push — master ( 36c2a1...ae1d0b )
by Paul
05:48
created
plugin/Modules/Translation.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	{
31 31
 		$translations = $this->translations();
32 32
 		$entries = $this->filter( $translations, $this->entries() )->results();
33
-		array_walk( $translations, function( &$entry ) use( $entries ) {
33
+		array_walk( $translations, function( &$entry ) use($entries) {
34 34
 			$entry['desc'] = array_key_exists( $entry['id'], $entries )
35 35
 				? $this->getEntryString( $entries[$entry['id']], 'msgctxt' )
36 36
 				: '';
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function entries()
45 45
 	{
46
-		if( !isset( $this->entries )) {
46
+		if( !isset($this->entries) ) {
47 47
 			$potFile = glsr()->path( glsr()->languages.'/'.Application::ID.'.pot' );
48 48
 			$entries = $this->extractEntriesFromPotFile( $potFile );
49 49
 			$entries = apply_filters( 'site-reviews/translation/entries', $entries );
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function filter( $filterWith = null, $entries = null, $intersect = true )
90 90
 	{
91
-		if( !is_array( $entries )) {
91
+		if( !is_array( $entries ) ) {
92 92
 			$entries = $this->results;
93 93
 		}
94
-		if( !is_array( $filterWith )) {
94
+		if( !is_array( $filterWith ) ) {
95 95
 			$filterWith = $this->translations();
96 96
 		}
97
-		$keys = array_flip( glsr_array_column( $filterWith, 'id' ));
97
+		$keys = array_flip( glsr_array_column( $filterWith, 'id' ) );
98 98
 		$this->results = $intersect
99 99
 			? array_intersect_key( $entries, $keys )
100 100
 			: array_diff_key( $entries, $keys );
@@ -108,17 +108,17 @@  discard block
 block discarded – undo
108 108
 	public function render( $template, array $entry )
109 109
 	{
110 110
 		$data = array_combine(
111
-			array_map( function( $key ) { return 'data.'.$key; }, array_keys( $entry )),
111
+			array_map( function( $key ) { return 'data.'.$key; }, array_keys( $entry ) ),
112 112
 			$entry
113 113
 		);
114 114
 		$data['data.class'] = $data['data.error'] = '';
115
-		if( array_search( $entry['s1'], glsr_array_column( $this->entries(), 'msgid' )) === false ) {
115
+		if( array_search( $entry['s1'], glsr_array_column( $this->entries(), 'msgid' ) ) === false ) {
116 116
 			$data['data.class'] = 'is-invalid';
117 117
 			$data['data.error'] = __( 'This custom translation is no longer valid as the original text has been changed or removed.', 'site-reviews' );
118 118
 		}
119 119
 		return glsr( Template::class )->build( 'partials/translations/'.$template, [
120 120
 			'context' => $data,
121
-		]);
121
+		] );
122 122
 	}
123 123
 
124 124
 	/**
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
 				'p1' => $this->getEntryString( $entry, 'msgid_plural' ),
151 151
 				's1' => $this->getEntryString( $entry, 'msgid' ),
152 152
 			];
153
-			$text = !empty( $data['p1'] )
153
+			$text = !empty($data['p1'])
154 154
 				? sprintf( '%s | %s', $data['s1'], $data['p1'] )
155 155
 				: $data['s1'];
156 156
 			$rendered .= $this->render( 'result', [
157
-				'entry' => json_encode( $data, JSON_HEX_APOS|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE ),
157
+				'entry' => json_encode( $data, JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_TAG | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ),
158 158
 				'text' => wp_strip_all_tags( $text ),
159
-			]);
159
+			] );
160 160
 		}
161 161
 		if( $resetAfterRender ) {
162 162
 			$this->reset();
@@ -189,12 +189,12 @@  discard block
 block discarded – undo
189 189
 	public function search( $needle = '' )
190 190
 	{
191 191
 		$this->reset();
192
-		$needle = trim( strtolower( $needle ));
192
+		$needle = trim( strtolower( $needle ) );
193 193
 		foreach( $this->entries() as $key => $entry ) {
194
-			$single = strtolower( $this->getEntryString( $entry, 'msgid' ));
195
-			$plural = strtolower( $this->getEntryString( $entry, 'msgid_plural' ));
194
+			$single = strtolower( $this->getEntryString( $entry, 'msgid' ) );
195
+			$plural = strtolower( $this->getEntryString( $entry, 'msgid_plural' ) );
196 196
 			if( strlen( $needle ) < static::SEARCH_THRESHOLD ) {
197
-				if( in_array( $needle, [$single, $plural] )) {
197
+				if( in_array( $needle, [$single, $plural] ) ) {
198 198
 					$this->results[$key] = $entry;
199 199
 				}
200 200
 			}
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
 	public function translations()
213 213
 	{
214 214
 		static $translations;
215
-		if( empty( $translations )) {
215
+		if( empty($translations) ) {
216 216
 			$settings = glsr( OptionManager::class )->get( 'settings' );
217
-			$translations = isset( $settings['strings'] )
218
-				? $this->normalizeSettings( (array) $settings['strings'] )
217
+			$translations = isset($settings['strings'])
218
+				? $this->normalizeSettings( (array)$settings['strings'] )
219 219
 				: [];
220 220
 		}
221 221
 		return $translations;
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
 	 */
228 228
 	protected function getEntryString( array $entry, $key )
229 229
 	{
230
-		return isset( $entry[$key] )
231
-			? implode( '', (array) $entry[$key] )
230
+		return isset($entry[$key])
231
+			? implode( '', (array)$entry[$key] )
232 232
 			: '';
233 233
 	}
234 234
 
@@ -240,9 +240,9 @@  discard block
 block discarded – undo
240 240
 		$keys = [
241 241
 			'msgctxt', 'msgid', 'msgid_plural', 'msgstr', 'msgstr[0]', 'msgstr[1]',
242 242
 		];
243
-		array_walk( $entries, function( &$entry ) use( $keys ) {
243
+		array_walk( $entries, function( &$entry ) use($keys) {
244 244
 			foreach( $keys as $key ) {
245
-				if( is_array( $entry )) {
245
+				if( is_array( $entry ) ) {
246 246
 					$entry = $this->normalizeEntryString( $entry, $key );
247 247
 					continue;
248 248
 				}
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 	 */
259 259
 	protected function normalizeEntryString( array $entry, $key )
260 260
 	{
261
-		if( isset( $entry[$key] )) {
261
+		if( isset($entry[$key]) ) {
262 262
 			$entry[$key] = $this->getEntryString( $entry, $key );
263 263
 		}
264 264
 		return $entry;
@@ -272,11 +272,11 @@  discard block
 block discarded – undo
272 272
 		$defaultString = array_fill_keys( ['id', 's1', 's2', 'p1', 'p2'], '' );
273 273
 		$strings = array_filter( $strings, 'is_array' );
274 274
 		foreach( $strings as &$string ) {
275
-			$string['type'] = isset( $string['p1'] ) ? 'plural' : 'single';
275
+			$string['type'] = isset($string['p1']) ? 'plural' : 'single';
276 276
 			$string = wp_parse_args( $string, $defaultString );
277 277
 		}
278 278
 		return array_filter( $strings, function( $string ) {
279
-			return !empty( $string['id'] );
279
+			return !empty($string['id']);
280 280
 		});
281 281
 	}
282 282
 }
Please login to merge, or discard this patch.
plugin/Modules/Console.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 */
111 111
 	public function get()
112 112
 	{
113
-		return empty( $this->log )
113
+		return empty($this->log)
114 114
 			? __( 'Console is empty', 'site-reviews' )
115 115
 			: $this->log;
116 116
 	}
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 	public function humanSize( $valueIfEmpty = null )
123 123
 	{
124 124
 		$bytes = $this->size();
125
-		if( empty( $bytes ) && is_string( $valueIfEmpty )) {
125
+		if( empty($bytes) && is_string( $valueIfEmpty ) ) {
126 126
 			return $valueIfEmpty;
127 127
 		}
128
-		$exponent = floor( log( max( $bytes, 1 ), 1024 ));
129
-		return round( $bytes / pow( 1024, $exponent ), 2 ).' '.['bytes','KB','MB','GB'][$exponent];
128
+		$exponent = floor( log( max( $bytes, 1 ), 1024 ) );
129
+		return round( $bytes / pow( 1024, $exponent ), 2 ).' '.['bytes', 'KB', 'MB', 'GB'][$exponent];
130 130
 	}
131 131
 
132 132
 	/**
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
 	public function log( $level, $message, array $context = [] )
150 150
 	{
151 151
 		$constants = (new ReflectionClass( __CLASS__ ))->getConstants();
152
-		if( in_array( $level, $constants, true )) {
152
+		if( in_array( $level, $constants, true ) ) {
153 153
 			$entry = $this->buildLogEntry( $level, $message, $context );
154
-			file_put_contents( $this->file, $entry, FILE_APPEND|LOCK_EX );
154
+			file_put_contents( $this->file, $entry, FILE_APPEND | LOCK_EX );
155 155
 			$this->reset();
156 156
 		}
157 157
 		return $this;
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
 	public function logOnce()
164 164
 	{
165 165
 		$single = glsr( Session::class )->get( 'glsr_log_once', null, true );
166
-		if( !is_array( $single ))return;
166
+		if( !is_array( $single ) )return;
167 167
 		foreach( $single as $message => $debug ) {
168
-			if( !empty( $debug )) {
169
-				$message.= PHP_EOL.print_r( $debug, 1 );
168
+			if( !empty($debug) ) {
169
+				$message .= PHP_EOL.print_r( $debug, 1 );
170 170
 			}
171 171
 			$this->log( static::RECURRING, $message );
172 172
 		}
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
 	public function once( $message, $debug = '' )
192 192
 	{
193 193
 		$once = glsr( Session::class )->get( 'glsr_log_once', [] );
194
-		if( !is_array( $once )) {
194
+		if( !is_array( $once ) ) {
195 195
 			$once = [];
196 196
 		}
197
-		if( !isset( $once[$message] )) {
197
+		if( !isset($once[$message]) ) {
198 198
 			$once[$message] = $debug;
199 199
 			glsr( Session::class )->set( 'glsr_log_once', $once );
200 200
 		}
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 	 */
257 257
 	protected function interpolate( $message, $context = [] )
258 258
 	{
259
-		if( $this->isObjectOrArray( $message ) || !is_array( $context )) {
259
+		if( $this->isObjectOrArray( $message ) || !is_array( $context ) ) {
260 260
 			return print_r( $message, true );
261 261
 		}
262 262
 		$replace = [];
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 		if( $value instanceof DateTime ) {
285 285
 			$value = $value->format( 'Y-m-d H:i:s' );
286 286
 		}
287
-		else if( $this->isObjectOrArray( $value )) {
287
+		else if( $this->isObjectOrArray( $value ) ) {
288 288
 			$value = json_encode( $value );
289 289
 		}
290 290
 		return (string)$value;
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 			$this->clear();
300 300
 			file_put_contents(
301 301
 				$this->file,
302
-				$this->buildLogEntry( 'info', __( 'Console was automatically cleared (128 KB maximum size)', 'site-reviews' ))
302
+				$this->buildLogEntry( 'info', __( 'Console was automatically cleared (128 KB maximum size)', 'site-reviews' ) )
303 303
 			);
304 304
 		}
305 305
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,9 @@
 block discarded – undo
163 163
 	public function logOnce()
164 164
 	{
165 165
 		$single = glsr( Session::class )->get( 'glsr_log_once', null, true );
166
-		if( !is_array( $single ))return;
166
+		if( !is_array( $single )) {
167
+			return;
168
+		}
167 169
 		foreach( $single as $message => $debug ) {
168 170
 			if( !empty( $debug )) {
169 171
 				$message.= PHP_EOL.print_r( $debug, 1 );
Please login to merge, or discard this patch.
plugin/Commands/CreateReview.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -30,25 +30,25 @@  discard block
 block discarded – undo
30 30
 	public function __construct( $input )
31 31
 	{
32 32
 		$this->request = $input;
33
-		$this->ajax_request = isset( $input['_ajax_request'] );
33
+		$this->ajax_request = isset($input['_ajax_request']);
34 34
 		$this->assigned_to = $this->getNumeric( 'assign_to' );
35
-		$this->author = sanitize_text_field( $this->getUser( 'name' ));
35
+		$this->author = sanitize_text_field( $this->getUser( 'name' ) );
36 36
 		$this->avatar = $this->getAvatar();
37
-		$this->blacklisted = isset( $input['blacklisted'] );
38
-		$this->category = sanitize_key( $this->get( 'category' ));
39
-		$this->content = sanitize_textarea_field( $this->get( 'content' ));
37
+		$this->blacklisted = isset($input['blacklisted']);
38
+		$this->category = sanitize_key( $this->get( 'category' ) );
39
+		$this->content = sanitize_textarea_field( $this->get( 'content' ) );
40 40
 		$this->custom = $this->getCustom();
41 41
 		$this->date = $this->getDate( 'date' );
42
-		$this->email = sanitize_email( $this->getUser( 'email' ));
43
-		$this->form_id = sanitize_key( $this->get( 'form_id' ));
42
+		$this->email = sanitize_email( $this->getUser( 'email' ) );
43
+		$this->form_id = sanitize_key( $this->get( 'form_id' ) );
44 44
 		$this->ip_address = $this->get( 'ip_address' );
45
-		$this->post_id = intval( $this->get( '_post_id' ));
46
-		$this->rating = intval( $this->get( 'rating' ));
45
+		$this->post_id = intval( $this->get( '_post_id' ) );
46
+		$this->rating = intval( $this->get( 'rating' ) );
47 47
 		$this->referer = $this->get( '_referer' );
48
-		$this->response = sanitize_textarea_field( $this->get( 'response' ));
49
-		$this->terms = !empty( $input['terms'] );
50
-		$this->title = sanitize_text_field( $this->get( 'title' ));
51
-		$this->url = esc_url_raw( $this->get( 'url' ));
48
+		$this->response = sanitize_textarea_field( $this->get( 'response' ) );
49
+		$this->terms = !empty($input['terms']);
50
+		$this->title = sanitize_text_field( $this->get( 'title' ) );
51
+		$this->url = esc_url_raw( $this->get( 'url' ) );
52 52
 	}
53 53
 
54 54
 	/**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	protected function get( $key )
59 59
 	{
60
-		return isset( $this->request[$key] )
60
+		return isset($this->request[$key])
61 61
 			? (string)$this->request[$key]
62 62
 			: '';
63 63
 	}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	{
70 70
 		$avatar = $this->get( 'avatar' );
71 71
 		return !filter_var( $avatar, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED )
72
-			? (string)get_avatar_url( $this->get( 'email' ))
72
+			? (string)get_avatar_url( $this->get( 'email' ) )
73 73
 			: $avatar;
74 74
 	}
75 75
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		$unset = apply_filters( 'site-reviews/create/unset-keys-from-custom', $unset );
87 87
 		$custom = $this->request;
88 88
 		foreach( $unset as $value ) {
89
-			unset( $custom[$value] );
89
+			unset($custom[$value]);
90 90
 		}
91 91
 		return $custom;
92 92
 	}
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	protected function getDate( $key )
99 99
 	{
100
-		$date = strtotime( $this->get( $key ));
100
+		$date = strtotime( $this->get( $key ) );
101 101
 		if( $date === false ) {
102 102
 			$date = time();
103 103
 		}
104
-		return get_date_from_gmt( gmdate( 'Y-m-d H:i:s', $date ));
104
+		return get_date_from_gmt( gmdate( 'Y-m-d H:i:s', $date ) );
105 105
 	}
106 106
 
107 107
 	/**
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 	protected function getUser( $key )
112 112
 	{
113 113
 		$value = $this->get( $key );
114
-		if( empty( $value )) {
114
+		if( empty($value) ) {
115 115
 			$user = wp_get_current_user();
116 116
 			$userValues = [
117 117
 				'email' => 'user_email',
118 118
 				'name' => 'display_name',
119 119
 			];
120
-			if( $user->exists() && array_key_exists( $key, $userValues )) {
120
+			if( $user->exists() && array_key_exists( $key, $userValues ) ) {
121 121
 				return $user->{$userValues[$key]};
122 122
 			}
123 123
 		}
Please login to merge, or discard this patch.
site-reviews.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 defined( 'WPINC' ) || die;
20 20
 
21
-if( !class_exists( 'GL_Plugin_Check_v3' )) {
21
+if( !class_exists( 'GL_Plugin_Check_v3' ) ) {
22 22
 	require_once __DIR__.'/activate.php';
23 23
 }
24 24
 $check = new GL_Plugin_Check_v3( __FILE__ );
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 $app = new GeminiLabs\SiteReviews\Application;
32 32
 $app->make( 'Provider' )->register( $app );
33
-register_activation_hook( __FILE__, array( $app, 'activate' ));
34
-register_deactivation_hook( __FILE__, array( $app, 'deactivate' ));
35
-register_shutdown_function( array( $app, 'catchFatalError' ));
33
+register_activation_hook( __FILE__, array( $app, 'activate' ) );
34
+register_deactivation_hook( __FILE__, array( $app, 'deactivate' ) );
35
+register_shutdown_function( array( $app, 'catchFatalError' ) );
36 36
 $app->init();
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	require_once __DIR__.'/activate.php';
23 23
 }
24 24
 $check = new GL_Plugin_Check_v3( __FILE__ );
25
-if( !$check->canProceed() )return;
25
+if( !$check->canProceed() ) {
26
+	return;
27
+}
26 28
 require_once __DIR__.'/autoload.php';
27 29
 require_once __DIR__.'/compatibility.php';
28 30
 require_once __DIR__.'/deprecated.php';
Please login to merge, or discard this patch.
plugin/Handlers/EnqueuePublicAssets.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 */
28 28
 	public function enqueueAssets()
29 29
 	{
30
-		if( apply_filters( 'site-reviews/assets/css', true )) {
30
+		if( apply_filters( 'site-reviews/assets/css', true ) ) {
31 31
 			wp_enqueue_style(
32 32
 				Application::ID,
33 33
 				$this->getStylesheet(),
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 				glsr()->version
36 36
 			);
37 37
 		}
38
-		if( apply_filters( 'site-reviews/assets/js', true )) {
38
+		if( apply_filters( 'site-reviews/assets/js', true ) ) {
39 39
 			$dependencies = apply_filters( 'site-reviews/assets/polyfill', true )
40 40
 				? [Application::ID.'/polyfill']
41 41
 				: [];
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function enqueuePolyfillService()
57 57
 	{
58
-		if( !apply_filters( 'site-reviews/assets/polyfill', true ))return;
59
-		wp_enqueue_script( Application::ID.'/polyfill', add_query_arg([
58
+		if( !apply_filters( 'site-reviews/assets/polyfill', true ) )return;
59
+		wp_enqueue_script( Application::ID.'/polyfill', add_query_arg( [
60 60
 			'features' => 'CustomEvent,Element.prototype.closest,Element.prototype.dataset,Event,XMLHttpRequest,MutationObserver',
61 61
 			'flags' => 'gated',
62
-		], 'https://polyfill.io/v3/polyfill.min.js' ));
62
+		], 'https://polyfill.io/v3/polyfill.min.js' ) );
63 63
 	}
64 64
 
65 65
 	/**
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 		// nf-google-recaptcha
73 73
 		if( !glsr( OptionManager::class )->isRecaptchaEnabled() )return;
74 74
 		$language = apply_filters( 'site-reviews/recaptcha/language', get_locale() );
75
-		wp_enqueue_script( Application::ID.'/google-recaptcha', add_query_arg([
75
+		wp_enqueue_script( Application::ID.'/google-recaptcha', add_query_arg( [
76 76
 			'hl' => $language,
77 77
 			'render' => 'explicit',
78
-		], 'https://www.google.com/recaptcha/api.js' ));
78
+		], 'https://www.google.com/recaptcha/api.js' ) );
79 79
 	}
80 80
 
81 81
 	/**
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 	public function inlineStyles()
85 85
 	{
86 86
 		$inlineStylesheetPath = glsr()->path( 'assets/styles/inline-styles.css' );
87
-		if( !apply_filters( 'site-reviews/assets/css', true ))return;
88
-		if( !file_exists( $inlineStylesheetPath )) {
87
+		if( !apply_filters( 'site-reviews/assets/css', true ) )return;
88
+		if( !file_exists( $inlineStylesheetPath ) ) {
89 89
 			glsr_log()->error( 'Inline stylesheet is missing: '.$inlineStylesheetPath );
90 90
 			return;
91 91
 		}
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 */
121 121
 	protected function getFixedSelectorsForPagination()
122 122
 	{
123
-		$selectors = ['#wpadminbar','.site-navigation-fixed'];
123
+		$selectors = ['#wpadminbar', '.site-navigation-fixed'];
124 124
 		return apply_filters( 'site-reviews/enqueue/public/localize/ajax-pagination', $selectors );
125 125
 	}
126 126
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	protected function getStylesheet()
131 131
 	{
132 132
 		$currentStyle = glsr( Style::class )->style;
133
-		return file_exists( glsr()->path( 'assets/styles/custom/'.$currentStyle.'.css' ))
133
+		return file_exists( glsr()->path( 'assets/styles/custom/'.$currentStyle.'.css' ) )
134 134
 			? glsr()->url( 'assets/styles/custom/'.$currentStyle.'.css' )
135 135
 			: glsr()->url( 'assets/styles/'.Application::ID.'.css' );
136 136
 	}
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,9 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function enqueuePolyfillService()
57 57
 	{
58
-		if( !apply_filters( 'site-reviews/assets/polyfill', true ))return;
58
+		if( !apply_filters( 'site-reviews/assets/polyfill', true )) {
59
+			return;
60
+		}
59 61
 		wp_enqueue_script( Application::ID.'/polyfill', add_query_arg([
60 62
 			'features' => 'CustomEvent,Element.prototype.closest,Element.prototype.dataset,Event,XMLHttpRequest,MutationObserver',
61 63
 			'flags' => 'gated',
@@ -70,7 +72,9 @@  discard block
 block discarded – undo
70 72
 		// wpforms-recaptcha
71 73
 		// google-recaptcha
72 74
 		// nf-google-recaptcha
73
-		if( !glsr( OptionManager::class )->isRecaptchaEnabled() )return;
75
+		if( !glsr( OptionManager::class )->isRecaptchaEnabled() ) {
76
+			return;
77
+		}
74 78
 		$language = apply_filters( 'site-reviews/recaptcha/language', get_locale() );
75 79
 		wp_enqueue_script( Application::ID.'/google-recaptcha', add_query_arg([
76 80
 			'hl' => $language,
@@ -84,7 +88,9 @@  discard block
 block discarded – undo
84 88
 	public function inlineStyles()
85 89
 	{
86 90
 		$inlineStylesheetPath = glsr()->path( 'assets/styles/inline-styles.css' );
87
-		if( !apply_filters( 'site-reviews/assets/css', true ))return;
91
+		if( !apply_filters( 'site-reviews/assets/css', true )) {
92
+			return;
93
+		}
88 94
 		if( !file_exists( $inlineStylesheetPath )) {
89 95
 			glsr_log()->error( 'Inline stylesheet is missing: '.$inlineStylesheetPath );
90 96
 			return;
Please login to merge, or discard this patch.