Test Failed
Push — master ( 59b255...755753 )
by Paul
04:04
created
compatibility.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,5 +9,5 @@
 block discarded – undo
9 9
  */
10 10
 add_filter( 'sbp_exclude_defer_scripts', function( $scriptHandles ) {
11 11
 	$scriptHandles[] = 'site-reviews/google-recaptcha';
12
-	return array_keys( array_flip( $scriptHandles ));
12
+	return array_keys( array_flip( $scriptHandles ) );
13 13
 });
Please login to merge, or discard this patch.
plugin/Controllers/AjaxController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function routerChangeReviewStatus( array $request )
24 24
 	{
25
-		wp_send_json_success( $this->execute( new ChangeStatus( $request )));
25
+		wp_send_json_success( $this->execute( new ChangeStatus( $request ) ) );
26 26
 	}
27 27
 
28 28
 	/**
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 	public function routerClearConsole()
32 32
 	{
33 33
 		glsr( AdminController::class )->routerClearConsole();
34
-		wp_send_json_success([
34
+		wp_send_json_success( [
35 35
 			'console' => glsr( Console::class )->get(),
36 36
 			'notices' => glsr( Notice::class )->get(),
37
-		]);
37
+		] );
38 38
 	}
39 39
 
40 40
 	/**
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 	{
45 45
 		$shortcode = $request['shortcode'];
46 46
 		$response = false;
47
-		if( array_key_exists( $shortcode, glsr()->mceShortcodes )) {
47
+		if( array_key_exists( $shortcode, glsr()->mceShortcodes ) ) {
48 48
 			$data = glsr()->mceShortcodes[$shortcode];
49
-			if( !empty( $data['errors'] )) {
49
+			if( !empty($data['errors']) ) {
50 50
 				$data['btn_okay'] = [esc_html__( 'Okay', 'site-reviews' )];
51 51
 			}
52 52
 			$response = [
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 	public function routerSearchPosts( array $request )
67 67
 	{
68 68
 		$results = glsr( Database::class )->searchPosts( $request['search'] );
69
-		wp_send_json_success([
69
+		wp_send_json_success( [
70 70
 			'empty' => '<div>'.__( 'Nothing found.', 'site-reviews' ).'</div>',
71 71
 			'items' => $results,
72
-		]);
72
+		] );
73 73
 	}
74 74
 
75 75
 	/**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function routerSearchTranslations( array $request )
79 79
 	{
80
-		if( empty( $request['exclude'] )) {
80
+		if( empty($request['exclude']) ) {
81 81
 			$request['exclude'] = [];
82 82
 		}
83 83
 		$results = glsr( Translator::class )
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
 			->exclude()
86 86
 			->exclude( $request['exclude'] )
87 87
 			->renderResults();
88
-		wp_send_json_success([
88
+		wp_send_json_success( [
89 89
 			'empty' => '<div>'.__( 'Nothing found.', 'site-reviews' ).'</div>',
90 90
 			'items' => $results,
91
-		]);
91
+		] );
92 92
 	}
93 93
 
94 94
 	/**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 			'message' => glsr( Session::class )->get( $request['form_id'].'message', '', true ),
103 103
 			'recaptcha' => glsr( Session::class )->get( $request['form_id'].'recaptcha', false, true ),
104 104
 		];
105
-		if( !wp_validate_boolean( $data['errors'] )) {
105
+		if( !wp_validate_boolean( $data['errors'] ) ) {
106 106
 			wp_send_json_success( $data );
107 107
 		}
108 108
 		wp_send_json_error( $data );
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
 	 */
114 114
 	public function routerTogglePinned( array $request )
115 115
 	{
116
-		$isPinned = $this->execute( new TogglePinned( $request ));
117
-		wp_send_json_success([
116
+		$isPinned = $this->execute( new TogglePinned( $request ) );
117
+		wp_send_json_success( [
118 118
 			'notices' => glsr( Notice::class )->get(),
119 119
 			'pinned' => $isPinned,
120
-		]);
120
+		] );
121 121
 	}
122 122
 }
Please login to merge, or discard this patch.
plugin/Modules/Html/Partials/SiteReviews.php 2 patches
Braces   +39 added lines, -13 removed lines patch added patch discarded remove patch
@@ -83,7 +83,9 @@  discard block
 block discarded – undo
83 83
 		$reviewValues = [];
84 84
 		foreach( $review as $key => $value ) {
85 85
 			$method = glsr( Helper::class )->buildMethodName( $key, 'buildOption' );
86
-			if( !method_exists( $this, $method ))continue;
86
+			if( !method_exists( $this, $method )) {
87
+				continue;
88
+			}
87 89
 			$reviewValues[$key] = $this->$method( $key, $value );
88 90
 		}
89 91
 		$reviewValues = apply_filters( 'site-reviews/review/build/after', $reviewValues );
@@ -97,9 +99,13 @@  discard block
 block discarded – undo
97 99
 	 */
98 100
 	protected function buildOptionAssignedTo( $key, $value )
99 101
 	{
100
-		if( $this->isHiddenOrEmpty( $key, 'settings.reviews.assigned_links.enabled' ))return;
102
+		if( $this->isHiddenOrEmpty( $key, 'settings.reviews.assigned_links.enabled' )) {
103
+			return;
104
+		}
101 105
 		$post = get_post( intval( $value ));
102
-		if( !( $post instanceof WP_Post ))return;
106
+		if( !( $post instanceof WP_Post )) {
107
+			return;
108
+		}
103 109
 		$permalink = glsr( Builder::class )->a( get_the_title( $post->ID ), [
104 110
 			'href' => get_the_permalink( $post->ID ),
105 111
 		]);
@@ -114,7 +120,9 @@  discard block
 block discarded – undo
114 120
 	 */
115 121
 	protected function buildOptionAuthor( $key, $value )
116 122
 	{
117
-		if( $this->isHidden( $key ))return;
123
+		if( $this->isHidden( $key )) {
124
+			return;
125
+		}
118 126
 		$prefix = !$this->isOptionEnabled( 'settings.reviews.avatars.enabled' )
119 127
 			? apply_filters( 'site-reviews/review/author/prefix', '&mdash;' )
120 128
 			: '';
@@ -128,7 +136,9 @@  discard block
 block discarded – undo
128 136
 	 */
129 137
 	protected function buildOptionAvatar( $key, $value )
130 138
 	{
131
-		if( $this->isHidden( $key, 'settings.reviews.avatars.enabled' ))return;
139
+		if( $this->isHidden( $key, 'settings.reviews.avatars.enabled' )) {
140
+			return;
141
+		}
132 142
 		$size = $this->getOption( 'settings.reviews.avatars.size', 40 );
133 143
 		return $this->wrap( $key, glsr( Builder::class )->img([
134 144
 			'src' => $this->generateAvatar( $value ),
@@ -145,7 +155,9 @@  discard block
 block discarded – undo
145 155
 	protected function buildOptionContent( $key, $value )
146 156
 	{
147 157
 		$text = $this->normalizeText( $value );
148
-		if( $this->isHiddenOrEmpty( $key, $text ))return;
158
+		if( $this->isHiddenOrEmpty( $key, $text )) {
159
+			return;
160
+		}
149 161
 		return $this->wrap( $key, '<p>'.$text.'</p>' );
150 162
 	}
151 163
 
@@ -156,7 +168,9 @@  discard block
 block discarded – undo
156 168
 	 */
157 169
 	protected function buildOptionDate( $key, $value )
158 170
 	{
159
-		if( $this->isHidden( $key ))return;
171
+		if( $this->isHidden( $key )) {
172
+			return;
173
+		}
160 174
 		$dateFormat = $this->getOption( 'settings.reviews.date.format', 'default' );
161 175
 		if( $dateFormat == 'relative' ) {
162 176
 			$date = glsr( Date::class )->relative( $value );
@@ -177,7 +191,9 @@  discard block
 block discarded – undo
177 191
 	 */
178 192
 	protected function buildOptionRating( $key, $value )
179 193
 	{
180
-		if( $this->isHiddenOrEmpty( $key, $value ))return;
194
+		if( $this->isHiddenOrEmpty( $key, $value )) {
195
+			return;
196
+		}
181 197
 		$rating = glsr( Html::class )->buildPartial( 'star-rating', [
182 198
 			'rating' => $value,
183 199
 		]);
@@ -191,7 +207,9 @@  discard block
 block discarded – undo
191 207
 	 */
192 208
 	protected function buildOptionResponse( $key, $value )
193 209
 	{
194
-		if( $this->isHiddenOrEmpty( $key, $value ))return;
210
+		if( $this->isHiddenOrEmpty( $key, $value )) {
211
+			return;
212
+		}
195 213
 		$title = sprintf( __( 'Response from %s', 'site-reviews' ), get_bloginfo( 'name' ));
196 214
 		$text = $this->normalizeText( $value );
197 215
 		$text = '<p><strong>'.$title.'</strong></p><p>'.$text.'</p>';
@@ -208,7 +226,9 @@  discard block
 block discarded – undo
208 226
 	 */
209 227
 	protected function buildOptionTitle( $key, $value )
210 228
 	{
211
-		if( $this->isHidden( $key ))return;
229
+		if( $this->isHidden( $key )) {
230
+			return;
231
+		}
212 232
 		if( empty( $value )) {
213 233
 			$value = __( 'No Title', 'site-reviews' );
214 234
 		}
@@ -238,7 +258,9 @@  discard block
 block discarded – undo
238 258
 	 */
239 259
 	protected function generateSchema()
240 260
 	{
241
-		if( !wp_validate_boolean( $this->args['schema'] ))return;
261
+		if( !wp_validate_boolean( $this->args['schema'] )) {
262
+			return;
263
+		}
242 264
 		glsr( Schema::class )->store(
243 265
 			glsr( Schema::class )->build( $this->args )
244 266
 		);
@@ -289,9 +311,13 @@  discard block
 block discarded – undo
289 311
 		$words->setText( $text );
290 312
 		$count = 0;
291 313
 		foreach( $words as $offset ){
292
-			if( $words->getRuleStatus() === IntlRuleBasedBreakIterator::WORD_NONE )continue;
314
+			if( $words->getRuleStatus() === IntlRuleBasedBreakIterator::WORD_NONE ) {
315
+				continue;
316
+			}
293 317
 			$count++;
294
-			if( $count != $limit )continue;
318
+			if( $count != $limit ) {
319
+				continue;
320
+			}
295 321
 			return $offset;
296 322
 		}
297 323
 		return strlen( $text );
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 				'navigation' => $navigation,
58 58
 			],
59 59
 			'reviews' => $this->buildReviews(),
60
-		]);
60
+		] );
61 61
 	}
62 62
 
63 63
 	/**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$reviewValues = [];
84 84
 		foreach( $review as $key => $value ) {
85 85
 			$method = glsr( Helper::class )->buildMethodName( $key, 'buildOption' );
86
-			if( !method_exists( $this, $method ))continue;
86
+			if( !method_exists( $this, $method ) )continue;
87 87
 			$reviewValues[$key] = $this->$method( $key, $value );
88 88
 		}
89 89
 		$reviewValues = apply_filters( 'site-reviews/review/build/after', $reviewValues );
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	protected function buildOptionAssignedTo( $key, $value )
99 99
 	{
100
-		if( $this->isHiddenOrEmpty( $key, 'settings.reviews.assigned_links.enabled' ))return;
101
-		$post = get_post( intval( $value ));
102
-		if( !( $post instanceof WP_Post ))return;
100
+		if( $this->isHiddenOrEmpty( $key, 'settings.reviews.assigned_links.enabled' ) )return;
101
+		$post = get_post( intval( $value ) );
102
+		if( !($post instanceof WP_Post) )return;
103 103
 		$permalink = glsr( Builder::class )->a( get_the_title( $post->ID ), [
104 104
 			'href' => get_the_permalink( $post->ID ),
105
-		]);
105
+		] );
106 106
 		$assignedTo = sprintf( __( 'Review of %s', 'site-reviews' ), $permalink );
107 107
 		return $this->wrap( $key, '<span>'.$assignedTo.'</span>' );
108 108
 	}
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	protected function buildOptionAuthor( $key, $value )
116 116
 	{
117
-		if( $this->isHidden( $key ))return;
117
+		if( $this->isHidden( $key ) )return;
118 118
 		$prefix = !$this->isOptionEnabled( 'settings.reviews.avatars.enabled' )
119 119
 			? apply_filters( 'site-reviews/review/author/prefix', '&mdash;' )
120 120
 			: '';
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
 	 */
129 129
 	protected function buildOptionAvatar( $key, $value )
130 130
 	{
131
-		if( $this->isHidden( $key, 'settings.reviews.avatars.enabled' ))return;
131
+		if( $this->isHidden( $key, 'settings.reviews.avatars.enabled' ) )return;
132 132
 		$size = $this->getOption( 'settings.reviews.avatars.size', 40 );
133
-		return $this->wrap( $key, glsr( Builder::class )->img([
133
+		return $this->wrap( $key, glsr( Builder::class )->img( [
134 134
 			'src' => $this->generateAvatar( $value ),
135 135
 			'height' => $size,
136 136
 			'width' => $size,
137
-		]));
137
+		] ) );
138 138
 	}
139 139
 
140 140
 	/**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	protected function buildOptionContent( $key, $value )
146 146
 	{
147 147
 		$text = $this->normalizeText( $value );
148
-		if( $this->isHiddenOrEmpty( $key, $text ))return;
148
+		if( $this->isHiddenOrEmpty( $key, $text ) )return;
149 149
 		return $this->wrap( $key, '<p>'.$text.'</p>' );
150 150
 	}
151 151
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	protected function buildOptionDate( $key, $value )
158 158
 	{
159
-		if( $this->isHidden( $key ))return;
159
+		if( $this->isHidden( $key ) )return;
160 160
 		$dateFormat = $this->getOption( 'settings.reviews.date.format', 'default' );
161 161
 		if( $dateFormat == 'relative' ) {
162 162
 			$date = glsr( Date::class )->relative( $value );
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 			$format = $dateFormat == 'custom'
166 166
 				? $this->getOption( 'settings.reviews.date.custom', 'M j, Y' )
167 167
 				: (string)get_option( 'date_format' );
168
-			$date = date_i18n( $format, strtotime( $value ));
168
+			$date = date_i18n( $format, strtotime( $value ) );
169 169
 		}
170 170
 		return $this->wrap( $key, '<span>'.$date.'</span>' );
171 171
 	}
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	protected function buildOptionRating( $key, $value )
179 179
 	{
180
-		if( $this->isHiddenOrEmpty( $key, $value ))return;
180
+		if( $this->isHiddenOrEmpty( $key, $value ) )return;
181 181
 		$rating = glsr( Html::class )->buildPartial( 'star-rating', [
182 182
 			'rating' => $value,
183
-		]);
183
+		] );
184 184
 		return $this->wrap( $key, $rating );
185 185
 	}
186 186
 
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
 	 */
192 192
 	protected function buildOptionResponse( $key, $value )
193 193
 	{
194
-		if( $this->isHiddenOrEmpty( $key, $value ))return;
195
-		$title = sprintf( __( 'Response from %s', 'site-reviews' ), get_bloginfo( 'name' ));
194
+		if( $this->isHiddenOrEmpty( $key, $value ) )return;
195
+		$title = sprintf( __( 'Response from %s', 'site-reviews' ), get_bloginfo( 'name' ) );
196 196
 		$text = $this->normalizeText( $value );
197 197
 		$text = '<p><strong>'.$title.'</strong></p><p>'.$text.'</p>';
198 198
 		return $this->wrap( $key,
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
 	 */
209 209
 	protected function buildOptionTitle( $key, $value )
210 210
 	{
211
-		if( $this->isHidden( $key ))return;
212
-		if( empty( $value )) {
211
+		if( $this->isHidden( $key ) )return;
212
+		if( empty($value) ) {
213 213
 			$value = __( 'No Title', 'site-reviews' );
214 214
 		}
215 215
 		return $this->wrap( $key, '<h3>'.$value.'</h3>' );
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			return $avatarUrl;
228 228
 		}
229 229
 		$authorIdOrEmail = get_the_author_meta( 'ID', $review->user_id );
230
-		if( empty( $authorIdOrEmail )) {
230
+		if( empty($authorIdOrEmail) ) {
231 231
 			$authorIdOrEmail = $review->email;
232 232
 		}
233 233
 		return (string)get_avatar_url( $authorIdOrEmail );
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 */
239 239
 	protected function generateSchema()
240 240
 	{
241
-		if( !wp_validate_boolean( $this->args['schema'] ))return;
241
+		if( !wp_validate_boolean( $this->args['schema'] ) )return;
242 242
 		glsr( Schema::class )->store(
243 243
 			glsr( Schema::class )->build( $this->args )
244 244
 		);
@@ -262,18 +262,18 @@  discard block
 block discarded – undo
262 262
 	 */
263 263
 	protected function getExcerpt( $text )
264 264
 	{
265
-		$limit = intval( $this->getOption( 'settings.reviews.excerpt.length', 55 ));
265
+		$limit = intval( $this->getOption( 'settings.reviews.excerpt.length', 55 ) );
266 266
 		$split = extension_loaded( 'intl' )
267 267
 			? $this->getExcerptIntlSplit( $text, $limit )
268 268
 			: $this->getExcerptSplit( $text, $limit );
269 269
 		$hiddenText = substr( $text, $split );
270
-		if( !empty( $hiddenText )) {
270
+		if( !empty($hiddenText) ) {
271 271
 			$showMore = glsr( Builder::class )->span( $hiddenText, [
272 272
 				'class' => 'glsr-hidden glsr-hidden-text',
273 273
 				'data-show-less' => __( 'Show less', 'site-reviews' ),
274 274
 				'data-show-more' => __( 'Show more', 'site-reviews' ),
275
-			]);
276
-			$text = ltrim( substr( $text, 0, $split )).$showMore;
275
+			] );
276
+			$text = ltrim( substr( $text, 0, $split ) ).$showMore;
277 277
 		}
278 278
 		return nl2br( $text );
279 279
 	}
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 		$words = IntlRuleBasedBreakIterator::createWordInstance( '' );
289 289
 		$words->setText( $text );
290 290
 		$count = 0;
291
-		foreach( $words as $offset ){
291
+		foreach( $words as $offset ) {
292 292
 			if( $words->getRuleStatus() === IntlRuleBasedBreakIterator::WORD_NONE )continue;
293 293
 			$count++;
294 294
 			if( $count != $limit )continue;
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 	protected function getExcerptSplit( $text, $limit )
306 306
 	{
307 307
 		if( str_word_count( $text, 0 ) > $limit ) {
308
-			$words = array_keys( str_word_count( $text, 2 ));
308
+			$words = array_keys( str_word_count( $text, 2 ) );
309 309
 			return $words[$limit];
310 310
 		}
311 311
 		return strlen( $text );
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	 */
319 319
 	protected function getOption( $path, $fallback = '' )
320 320
 	{
321
-		if( array_key_exists( $path, $this->options )) {
321
+		if( array_key_exists( $path, $this->options ) ) {
322 322
 			return $this->options[$path];
323 323
 		}
324 324
 		return $fallback;
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 	 */
332 332
 	protected function isHidden( $key, $path = '' )
333 333
 	{
334
-		$isOptionEnabled = !empty( $path )
334
+		$isOptionEnabled = !empty($path)
335 335
 			? $this->isOptionEnabled( $path )
336 336
 			: true;
337 337
 		return in_array( $key, $this->args['hide'] ) || !$isOptionEnabled;
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 	 */
345 345
 	protected function isHiddenOrEmpty( $key, $value )
346 346
 	{
347
-		return $this->isHidden( $key ) || empty( $value );
347
+		return $this->isHidden( $key ) || empty($value);
348 348
 	}
349 349
 
350 350
 	/**
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	protected function normalizeText( $text )
364 364
 	{
365 365
 		$text = wp_kses( $text, wp_kses_allowed_html() );
366
-		$text = convert_smilies( wptexturize( strip_shortcodes( $text )));
366
+		$text = convert_smilies( wptexturize( strip_shortcodes( $text ) ) );
367 367
 		$text = str_replace( ']]>', ']]&gt;', $text );
368 368
 		$text = preg_replace( '/(\R){2,}/', '$1', $text );
369 369
 		return $this->isOptionEnabled( 'settings.reviews.excerpt.enabled' )
@@ -380,6 +380,6 @@  discard block
 block discarded – undo
380 380
 	{
381 381
 		return glsr( Builder::class )->div( $value, [
382 382
 			'class' => 'glsr-review-'.$key,
383
-		]);
383
+		] );
384 384
 	}
385 385
 }
Please login to merge, or discard this patch.
plugin/Controllers/EditorController/Metaboxes.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function saveAssignedToMetabox( $postId )
87 87
 	{
88
-		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-assigned-to' ), 'assigned_to' ))return;
88
+		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-assigned-to' ), 'assigned_to' ) )return;
89 89
 		$assignedTo = glsr( Helper::class )->filterInput( 'assigned_to' );
90 90
 		$assignedTo || $assignedTo = '';
91 91
 		if( get_post_meta( $postId, 'assigned_to', true ) != $assignedTo ) {
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function saveResponseMetabox( $postId )
102 102
 	{
103
-		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-response' ), 'response' ))return;
103
+		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-response' ), 'response' ) )return;
104 104
 		$response = glsr( Helper::class )->filterInput( 'response' );
105 105
 		$response || $response = '';
106 106
 		update_post_meta( $postId, 'response', trim( wp_kses( $response, [
107 107
 			'a' => ['href' => [], 'title' => []],
108 108
 			'em' => [],
109 109
 			'strong' => [],
110
-		])));
110
+		] ) ) );
111 111
 	}
112 112
 
113 113
 	/**
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	protected function getAssignedToPostId( $postId )
118 118
 	{
119
-		$assignedTo = intval( get_post_meta( $postId, 'assigned_to', true ));
120
-		if(( $post = get_post( $assignedTo )) instanceof WP_Post ) {
119
+		$assignedTo = intval( get_post_meta( $postId, 'assigned_to', true ) );
120
+		if( ($post = get_post( $assignedTo )) instanceof WP_Post ) {
121 121
 			return $post->ID;
122 122
 		}
123 123
 		return false;
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
 		$meta = wp_parse_args( $meta, [
132 132
 			'rating' => get_post_meta( $review->ID, 'rating', true ),
133 133
 			'review_type' => get_post_meta( $review->ID, 'review_type', true ),
134
-		]);
134
+		] );
135 135
 		if( !in_array( $meta['review_type'], glsr()->reviewTypes )
136 136
 			|| intval( $meta['rating'] ) > Rating::MAX_RATING
137 137
 		)return;
138 138
 		$counts = glsr( OptionManager::class )->get( 'counts.'.$meta['review_type'], [] );
139 139
 		foreach( range( 0, Rating::MAX_RATING ) as $rating ) {
140
-			if( isset( $counts[$rating] ))continue;
140
+			if( isset($counts[$rating]) )continue;
141 141
 			$counts[$rating] = 0;
142 142
 		}
143 143
 		ksort( $counts );
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	protected function setReviewCounts( WP_Post $review, array $counts )
151 151
 	{
152 152
 		$type = get_post_meta( $review->ID, 'review_type', true );
153
-		if( !in_array( $type, glsr()->reviewTypes ))return;
153
+		if( !in_array( $type, glsr()->reviewTypes ) )return;
154 154
 		glsr( OptionManager::class )->set( 'counts.'.$type, $counts );
155 155
 	}
156 156
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	protected function increaseReviewCount( WP_Post $review, array $meta = [] )
161 161
 	{
162
-		if( $counts = $this->getReviewCounts( $review, $meta )) {
162
+		if( $counts = $this->getReviewCounts( $review, $meta ) ) {
163 163
 			$counts[$rating] -= 1;
164 164
 			$this->setReviewCounts( $review, $counts );
165 165
 		}
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 */
171 171
 	protected function decreaseReviewCount( WP_Post $review, array $meta = [] )
172 172
 	{
173
-		if( $counts = $this->getReviewCounts( $review, $meta )) {
173
+		if( $counts = $this->getReviewCounts( $review, $meta ) ) {
174 174
 			$counts[$rating] += 1;
175 175
 			$this->setReviewCounts( $review, $counts );
176 176
 		}
@@ -197,22 +197,22 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	protected function updateAssignedToPost( WP_Post $review )
199 199
 	{
200
-		if( !( $postId = $this->getAssignedToPostId( $review->ID )))return;
201
-		$reviewIds = array_filter( (array)get_post_meta( $postId, static::META_REVIEW_ID ));
202
-		if( empty( $reviewIds ))return;
200
+		if( !($postId = $this->getAssignedToPostId( $review->ID )) )return;
201
+		$reviewIds = array_filter( (array)get_post_meta( $postId, static::META_REVIEW_ID ) );
202
+		if( empty($reviewIds) )return;
203 203
 		$this->updateReviewIdOfPost( $postId, $review, $reviewIds );
204
-		$updatedReviewIds = array_filter( (array)get_post_meta( $postId, static::META_REVIEW_ID ));
205
-		if( empty( $updatedReviewIds )) {
204
+		$updatedReviewIds = array_filter( (array)get_post_meta( $postId, static::META_REVIEW_ID ) );
205
+		if( empty($updatedReviewIds) ) {
206 206
 			delete_post_meta( $postId, static::META_RANKING );
207 207
 			delete_post_meta( $postId, static::META_REVIEW_ID );
208 208
 		}
209
-		else if( !glsr( Helper::class )->compareArrays( $reviewIds, $updatedReviewIds )) {
210
-			$reviews = glsr( Database::class )->getReviews([
209
+		else if( !glsr( Helper::class )->compareArrays( $reviewIds, $updatedReviewIds ) ) {
210
+			$reviews = glsr( Database::class )->getReviews( [
211 211
 				'count' => -1,
212 212
 				'post__in' => $updatedReviewIds,
213
-			]);
214
-			update_post_meta( $postId, static::META_AVERAGE, $this->recalculatePostAverage( $reviews->results ));
215
-			update_post_meta( $postId, static::META_RANKING, $this->recalculatePostRanking( $reviews->results ));
213
+			] );
214
+			update_post_meta( $postId, static::META_AVERAGE, $this->recalculatePostAverage( $reviews->results ) );
215
+			update_post_meta( $postId, static::META_RANKING, $this->recalculatePostRanking( $reviews->results ) );
216 216
 		}
217 217
 	}
218 218
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 		if( $review->post_status != 'publish' ) {
226 226
 			delete_post_meta( $postId, static::META_REVIEW_ID, $review->ID );
227 227
 		}
228
-		else if( !in_array( $review->ID, $reviewIds )) {
228
+		else if( !in_array( $review->ID, $reviewIds ) ) {
229 229
 			add_post_meta( $postId, static::META_REVIEW_ID, $review->ID );
230 230
 		}
231 231
 	}
Please login to merge, or discard this patch.
Braces   +30 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@  discard block
 block discarded – undo
23 23
 	public function onBeforeUpdateReview( WP_Post $review, $metaKey, $metaValue )
24 24
 	{
25 25
 		$previousValue = get_post_meta( $review->ID, $metaKey, true );
26
-		if( $previousValue == $metaValue )return;
26
+		if( $previousValue == $metaValue ) {
27
+			return;
28
+		}
27 29
 		$this->decreaseReviewCount( $review );
28 30
 		$this->increaseReviewCount( $review, [$metaKey => $metaValue] );
29 31
 	}
@@ -36,7 +38,9 @@  discard block
 block discarded – undo
36 38
 	 */
37 39
 	public function onCreateReview( $postData, $meta, $postId )
38 40
 	{
39
-		if( get_post_field( 'post_type', $postId ) !== Application::POST_TYPE )return;
41
+		if( get_post_field( 'post_type', $postId ) !== Application::POST_TYPE ) {
42
+			return;
43
+		}
40 44
 		$review = get_post( $postId )
41 45
 		$this->updateAssignedToPost( $review );
42 46
 		$this->increaseReviewCount( $review );
@@ -48,7 +52,9 @@  discard block
 block discarded – undo
48 52
 	 */
49 53
 	public function onDeleteReview( $postId )
50 54
 	{
51
-		if( get_post_field( 'post_type', $postId ) !== Application::POST_TYPE )return;
55
+		if( get_post_field( 'post_type', $postId ) !== Application::POST_TYPE ) {
56
+			return;
57
+		}
52 58
 		$review = get_post( $postId )
53 59
 		$review->post_status = 'deleted'; // important to change the post_status here first!
54 60
 		$this->updateAssignedToPost( $review );
@@ -85,7 +91,9 @@  discard block
 block discarded – undo
85 91
 	 */
86 92
 	public function saveAssignedToMetabox( $postId )
87 93
 	{
88
-		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-assigned-to' ), 'assigned_to' ))return;
94
+		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-assigned-to' ), 'assigned_to' )) {
95
+			return;
96
+		}
89 97
 		$assignedTo = glsr( Helper::class )->filterInput( 'assigned_to' );
90 98
 		$assignedTo || $assignedTo = '';
91 99
 		if( get_post_meta( $postId, 'assigned_to', true ) != $assignedTo ) {
@@ -100,7 +108,9 @@  discard block
 block discarded – undo
100 108
 	 */
101 109
 	public function saveResponseMetabox( $postId )
102 110
 	{
103
-		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-response' ), 'response' ))return;
111
+		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-response' ), 'response' )) {
112
+			return;
113
+		}
104 114
 		$response = glsr( Helper::class )->filterInput( 'response' );
105 115
 		$response || $response = '';
106 116
 		update_post_meta( $postId, 'response', trim( wp_kses( $response, [
@@ -134,10 +144,14 @@  discard block
 block discarded – undo
134 144
 		]);
135 145
 		if( !in_array( $meta['review_type'], glsr()->reviewTypes )
136 146
 			|| intval( $meta['rating'] ) > Rating::MAX_RATING
137
-		)return;
147
+		) {
148
+			return;
149
+		}
138 150
 		$counts = glsr( OptionManager::class )->get( 'counts.'.$meta['review_type'], [] );
139 151
 		foreach( range( 0, Rating::MAX_RATING ) as $rating ) {
140
-			if( isset( $counts[$rating] ))continue;
152
+			if( isset( $counts[$rating] )) {
153
+				continue;
154
+			}
141 155
 			$counts[$rating] = 0;
142 156
 		}
143 157
 		ksort( $counts );
@@ -150,7 +164,9 @@  discard block
 block discarded – undo
150 164
 	protected function setReviewCounts( WP_Post $review, array $counts )
151 165
 	{
152 166
 		$type = get_post_meta( $review->ID, 'review_type', true );
153
-		if( !in_array( $type, glsr()->reviewTypes ))return;
167
+		if( !in_array( $type, glsr()->reviewTypes )) {
168
+			return;
169
+		}
154 170
 		glsr( OptionManager::class )->set( 'counts.'.$type, $counts );
155 171
 	}
156 172
 
@@ -197,9 +213,13 @@  discard block
 block discarded – undo
197 213
 	 */
198 214
 	protected function updateAssignedToPost( WP_Post $review )
199 215
 	{
200
-		if( !( $postId = $this->getAssignedToPostId( $review->ID )))return;
216
+		if( !( $postId = $this->getAssignedToPostId( $review->ID ))) {
217
+			return;
218
+		}
201 219
 		$reviewIds = array_filter( (array)get_post_meta( $postId, static::META_REVIEW_ID ));
202
-		if( empty( $reviewIds ))return;
220
+		if( empty( $reviewIds )) {
221
+			return;
222
+		}
203 223
 		$this->updateReviewIdOfPost( $postId, $review, $reviewIds );
204 224
 		$updatedReviewIds = array_filter( (array)get_post_meta( $postId, static::META_REVIEW_ID ));
205 225
 		if( empty( $updatedReviewIds )) {
Please login to merge, or discard this patch.
plugin/Database.php 2 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 			'post_type' => Application::POST_TYPE,
36 36
 		];
37 37
 		$postId = wp_insert_post( $post, true );
38
-		if( is_wp_error( $postId )) {
38
+		if( is_wp_error( $postId ) ) {
39 39
 			glsr_log()->error( $postId->get_error_message() );
40 40
 			return false;
41 41
 		}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function deleteReview( $metaReviewId )
53 53
 	{
54
-		if( $postId = $this->getReviewPostId( $metaReviewId )) {
54
+		if( $postId = $this->getReviewPostId( $metaReviewId ) ) {
55 55
 			wp_delete_post( $postId, true );
56 56
 		}
57 57
 	}
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 	public function getAssignedToPost( $post, $assignedTo = '' )
65 65
 	{
66 66
 		$post = get_post( $post );
67
-		if( !( $post instanceof WP_Post ))return;
68
-		if( empty( $assignedTo )) {
67
+		if( !($post instanceof WP_Post) )return;
68
+		if( empty($assignedTo) ) {
69 69
 			$assignedTo = get_post_meta( $post->ID, 'assigned_to', true );
70 70
 		}
71 71
 		$assignedPost = get_post( $assignedTo );
72
-		if( !empty( $assignedTo )
72
+		if( !empty($assignedTo)
73 73
 			&& $assignedPost instanceof WP_Post
74 74
 			&& $assignedPost->ID != $post->ID ) {
75 75
 			return $assignedPost;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function getReview( $post )
84 84
 	{
85
-		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE )return;
85
+		if( !($post instanceof WP_Post) || $post->post_type != Application::POST_TYPE )return;
86 86
 		$review = $this->getReviewMeta( $post->ID );
87 87
 		$modified = $this->isReviewModified( $post, $review );
88 88
 		$review->content = $post->post_content;
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
 	{
105 105
 		$metaKey = $this->normalizeMetaKey( $metaKey );
106 106
 		if( !$metaKey ) {
107
-			return (array) wp_count_posts( Application::POST_TYPE );
107
+			return (array)wp_count_posts( Application::POST_TYPE );
108 108
 		}
109 109
 		$counts = glsr( Cache::class )->getReviewCountsFor( $metaKey );
110 110
 		if( !$metaValue ) {
111 111
 			return $counts;
112 112
 		}
113
-		return isset( $counts[$metaValue] )
113
+		return isset($counts[$metaValue])
114 114
 			? $counts[$metaValue]
115 115
 			: 0;
116 116
 	}
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
 	public function getReviewMeta( $postId )
132 132
 	{
133 133
 		$meta = get_post_type( $postId ) == Application::POST_TYPE
134
-			? array_map( 'array_shift', (array) get_post_meta( $postId ))
134
+			? array_map( 'array_shift', (array)get_post_meta( $postId ) )
135 135
 			: [];
136
-		return (object) $this->normalizeMeta( array_filter( $meta, 'strlen' ));
136
+		return (object)$this->normalizeMeta( array_filter( $meta, 'strlen' ) );
137 137
 	}
138 138
 
139 139
 	/**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		$paged = glsr( QueryBuilder::class )->getPaged(
163 163
 			wp_validate_boolean( $args['pagination'] )
164 164
 		);
165
-		$reviews = new WP_Query([
165
+		$reviews = new WP_Query( [
166 166
 			'meta_key' => 'pinned',
167 167
 			'meta_query' => $metaQuery,
168 168
 			'offset' => $args['offset'],
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
 			'post_type' => Application::POST_TYPE,
176 176
 			'posts_per_page' => $args['count'] ? $args['count'] : -1,
177 177
 			'tax_query' => $taxQuery,
178
-		]);
179
-		return (object) [
178
+		] );
179
+		return (object)[
180 180
 			'results' => array_map( [$this, 'getReview'], $reviews->posts ),
181 181
 			'max_num_pages' => $reviews->max_num_pages,
182 182
 		];
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	public function getReviewsMeta( $keys, $status = 'publish' )
191 191
 	{
192 192
 		$keys = array_map( [$this, 'normalizeMetaKey'], (array)$keys );
193
-		if( $status == 'all' || empty( $status )) {
193
+		if( $status == 'all' || empty($status) ) {
194 194
 			$status = get_post_stati( ['exclude_from_search' => false] );
195 195
 		}
196 196
 		return glsr( SqlQueries::class )->getReviewsMeta( $keys, $status );
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
 			'fields' => 'id=>name',
207 207
 			'hide_empty' => false,
208 208
 			'taxonomy' => Application::TAXONOMY,
209
-		]);
210
-		unset( $args['count'] ); //we don't want a term count
209
+		] );
210
+		unset($args['count']); //we don't want a term count
211 211
 		$terms = get_terms( $args );
212
-		if( is_wp_error( $terms )) {
212
+		if( is_wp_error( $terms ) ) {
213 213
 			glsr_log()->error( $terms->get_error_message() );
214 214
 			return [];
215 215
 		}
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 */
222 222
 	public function normalizeMeta( array $meta )
223 223
 	{
224
-		if( empty( $meta )) {
224
+		if( empty($meta) ) {
225 225
 			return [];
226 226
 		}
227 227
 		$defaults = wp_parse_args( $meta, [
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 			'date' => '',
230 230
 			'review_id' => '',
231 231
 			'review_type' => '',
232
-		]);
232
+		] );
233 233
 		return glsr( CreateReviewDefaults::class )->restrict( $defaults );
234 234
 	}
235 235
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 	public function normalizeMetaKey( $metaKey )
241 241
 	{
242 242
 		$metaKey = strtolower( $metaKey );
243
-		if( in_array( $metaKey, ['id', 'type'] )) {
243
+		if( in_array( $metaKey, ['id', 'type'] ) ) {
244 244
 			$metaKey = 'review_'.$metaKey;
245 245
 		}
246 246
 		return $metaKey;
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
 	public function normalizeTerms( $termIds )
254 254
 	{
255 255
 		$terms = [];
256
-		$termIds = array_map( 'trim', explode( ',', $termIds ));
256
+		$termIds = array_map( 'trim', explode( ',', $termIds ) );
257 257
 		foreach( $termIds as $termId ) {
258 258
 			$term = term_exists( $termId, Application::TAXONOMY );
259
-			if( !isset( $term['term_id'] ))continue;
259
+			if( !isset($term['term_id']) )continue;
260 260
 			$terms[] = intval( $term['term_id'] );
261 261
 		}
262 262
 		return $terms;
@@ -270,13 +270,13 @@  discard block
 block discarded – undo
270 270
 	{
271 271
 		if( get_post_field( 'post_type', $postId ) != Application::POST_TYPE )return;
272 272
 		delete_post_meta( $postId, '_edit_last' );
273
-		$result = wp_update_post([
273
+		$result = wp_update_post( [
274 274
 			'ID' => $postId,
275 275
 			'post_content' => get_post_meta( $postId, 'content', true ),
276 276
 			'post_date' => get_post_meta( $postId, 'date', true ),
277 277
 			'post_title' => get_post_meta( $postId, 'title', true ),
278
-		]);
279
-		if( is_wp_error( $result )) {
278
+		] );
279
+		if( is_wp_error( $result ) ) {
280 280
 			glsr_log()->error( $result->get_error_message() );
281 281
 		}
282 282
 	}
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 			'post_status' => 'publish',
292 292
 			'post_type' => 'any',
293 293
 		];
294
-		if( is_numeric( $searchTerm )) {
294
+		if( is_numeric( $searchTerm ) ) {
295 295
 			$args['post__in'] = [$searchTerm];
296 296
 		}
297 297
 		else {
@@ -310,9 +310,9 @@  discard block
 block discarded – undo
310 310
 			ob_start();
311 311
 			glsr()->render( 'partials/editor/search-result', [
312 312
 				'ID' => get_the_ID(),
313
-				'permalink' => esc_url( (string) get_permalink() ),
313
+				'permalink' => esc_url( (string)get_permalink() ),
314 314
 				'title' => esc_attr( get_the_title() ),
315
-			]);
315
+			] );
316 316
 			$results .= ob_get_clean();
317 317
 		}
318 318
 		wp_reset_postdata();
@@ -327,9 +327,9 @@  discard block
 block discarded – undo
327 327
 	public function setReviewTerms( $postId, $termIds )
328 328
 	{
329 329
 		$terms = $this->normalizeTerms( $termIds );
330
-		if( empty( $terms ))return;
330
+		if( empty($terms) )return;
331 331
 		$result = wp_set_object_terms( $postId, $terms, Application::TAXONOMY );
332
-		if( is_wp_error( $result )) {
332
+		if( is_wp_error( $result ) ) {
333 333
 			glsr_log()->error( $result->get_error_message() );
334 334
 		}
335 335
 	}
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 	protected function getNewPostStatus( array $review, $isBlacklisted )
342 342
 	{
343 343
 		$requireApprovalOption = glsr( OptionManager::class )->get( 'settings.general.require.approval' );
344
-		return $review['review_type'] == 'local' && ( $requireApprovalOption == 'yes' || $isBlacklisted )
344
+		return $review['review_type'] == 'local' && ($requireApprovalOption == 'yes' || $isBlacklisted)
345 345
 			? 'pending'
346 346
 			: 'publish';
347 347
 	}
Please login to merge, or discard this patch.
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@  discard block
 block discarded – undo
64 64
 	public function getAssignedToPost( $post, $assignedTo = '' )
65 65
 	{
66 66
 		$post = get_post( $post );
67
-		if( !( $post instanceof WP_Post ))return;
67
+		if( !( $post instanceof WP_Post )) {
68
+			return;
69
+		}
68 70
 		if( empty( $assignedTo )) {
69 71
 			$assignedTo = get_post_meta( $post->ID, 'assigned_to', true );
70 72
 		}
@@ -82,7 +84,9 @@  discard block
 block discarded – undo
82 84
 	 */
83 85
 	public function getReview( $post )
84 86
 	{
85
-		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE )return;
87
+		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE ) {
88
+			return;
89
+		}
86 90
 		$review = $this->getReviewMeta( $post->ID );
87 91
 		$modified = $this->isReviewModified( $post, $review );
88 92
 		$review->content = $post->post_content;
@@ -256,7 +260,9 @@  discard block
 block discarded – undo
256 260
 		$termIds = array_map( 'trim', explode( ',', $termIds ));
257 261
 		foreach( $termIds as $termId ) {
258 262
 			$term = term_exists( $termId, Application::TAXONOMY );
259
-			if( !isset( $term['term_id'] ))continue;
263
+			if( !isset( $term['term_id'] )) {
264
+				continue;
265
+			}
260 266
 			$terms[] = intval( $term['term_id'] );
261 267
 		}
262 268
 		return $terms;
@@ -268,7 +274,9 @@  discard block
 block discarded – undo
268 274
 	 */
269 275
 	public function revertReview( $postId )
270 276
 	{
271
-		if( get_post_field( 'post_type', $postId ) != Application::POST_TYPE )return;
277
+		if( get_post_field( 'post_type', $postId ) != Application::POST_TYPE ) {
278
+			return;
279
+		}
272 280
 		delete_post_meta( $postId, '_edit_last' );
273 281
 		$result = wp_update_post([
274 282
 			'ID' => $postId,
@@ -303,7 +311,9 @@  discard block
 block discarded – undo
303 311
 		add_filter( 'posts_search', [$queryBuilder, 'filterSearchByTitle'], 500, 2 );
304 312
 		$search = new WP_Query( $args );
305 313
 		remove_filter( 'posts_search', [$queryBuilder, 'filterSearchByTitle'], 500 );
306
-		if( !$search->have_posts() )return;
314
+		if( !$search->have_posts() ) {
315
+			return;
316
+		}
307 317
 		$results = '';
308 318
 		while( $search->have_posts() ) {
309 319
 			$search->the_post();
@@ -327,7 +337,9 @@  discard block
 block discarded – undo
327 337
 	public function setReviewTerms( $postId, $termIds )
328 338
 	{
329 339
 		$terms = $this->normalizeTerms( $termIds );
330
-		if( empty( $terms ))return;
340
+		if( empty( $terms )) {
341
+			return;
342
+		}
331 343
 		$result = wp_set_object_terms( $postId, $terms, Application::TAXONOMY );
332 344
 		if( is_wp_error( $result )) {
333 345
 			glsr_log()->error( $result->get_error_message() );
Please login to merge, or discard this patch.