Passed
Push — master ( 0dd98d...32d871 )
by Paul
05:17
created
plugin/Controllers/AdminController.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -115,7 +115,9 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	public function renderReviewEditor( WP_Post $post )
117 117
 	{
118
-		if( !$this->isReviewPostType( $post ) || $this->isReviewEditable( $post ) )return;
118
+		if( !$this->isReviewPostType( $post ) || $this->isReviewEditable( $post ) ) {
119
+			return;
120
+		}
119 121
 		glsr()->render( 'partials/editor/review', [
120 122
 			'post' => $post,
121 123
 		]);
@@ -127,7 +129,9 @@  discard block
 block discarded – undo
127 129
 	 */
128 130
 	public function renderReviewNotice( WP_Post $post )
129 131
 	{
130
-		if( !$this->isReviewPostType( $post ) || $this->isReviewEditable( $post ))return;
132
+		if( !$this->isReviewPostType( $post ) || $this->isReviewEditable( $post )) {
133
+			return;
134
+		}
131 135
 		glsr( Notice::class )->addWarning( __( 'This review is read-only.', 'site-reviews' ));
132 136
 		glsr( Html::class )->renderTemplate( 'partials/editor/notice', [
133 137
 			'context' => [
@@ -142,13 +146,19 @@  discard block
 block discarded – undo
142 146
 	 */
143 147
 	public function renderTinymceButton()
144 148
 	{
145
-		if( glsr_current_screen()->base != 'post' )return;
149
+		if( glsr_current_screen()->base != 'post' ) {
150
+			return;
151
+		}
146 152
 		$shortcodes = [];
147 153
 		foreach( glsr()->mceShortcodes as $shortcode => $values ) {
148
-			if( !apply_filters( sanitize_title( $shortcode ).'_condition', true ))continue;
154
+			if( !apply_filters( sanitize_title( $shortcode ).'_condition', true )) {
155
+				continue;
156
+			}
149 157
 			$shortcodes[$shortcode] = $values;
150 158
 		}
151
-		if( empty( $shortcodes ))return;
159
+		if( empty( $shortcodes )) {
160
+			return;
161
+		}
152 162
 		glsr()->render( 'partials/editor/tinymce', [
153 163
 			'shortcodes' => $shortcodes,
154 164
 		]);
Please login to merge, or discard this patch.
plugin/Controllers/ListTableController.php 1 patch
Braces   +20 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@  discard block
 block discarded – undo
54 54
 	{
55 55
 		$postTypeColumns = glsr()->postTypeColumns[Application::POST_TYPE];
56 56
 		foreach( $postTypeColumns as $key => &$value ) {
57
-			if( !array_key_exists( $key, $columns ) || !empty( $value ))continue;
57
+			if( !array_key_exists( $key, $columns ) || !empty( $value )) {
58
+				continue;
59
+			}
58 60
 			$value = $columns[$key];
59 61
 		}
60 62
 		if( count( glsr( Database::class )->getReviewsMeta( 'type' )) < 2 ) {
@@ -92,7 +94,8 @@  discard block
 block discarded – undo
92 94
 	 * @return array
93 95
 	 * @filter display_post_states
94 96
 	 */
95
-	public function filterPostStates( array $postStates, WP_Post $post ) {
97
+	public function filterPostStates( array $postStates, WP_Post $post )
98
+	{
96 99
 		if( $post->post_type == Application::POST_TYPE
97 100
 			&& array_key_exists( 'pending', $postStates )) {
98 101
 			$postStates['pending'] = __( 'Unapproved', 'site-reviews' );
@@ -137,7 +140,9 @@  discard block
 block discarded – undo
137 140
 		$postTypeColumns = glsr()->postTypeColumns[Application::POST_TYPE];
138 141
 		unset( $postTypeColumns['cb'] );
139 142
 		foreach( $postTypeColumns as $key => $value ) {
140
-			if( glsr( Helper::class )->startsWith( 'taxonomy', $key ))continue;
143
+			if( glsr( Helper::class )->startsWith( 'taxonomy', $key )) {
144
+				continue;
145
+			}
141 146
 			$columns[$key] = $key;
142 147
 		}
143 148
 		return $columns;
@@ -161,7 +166,9 @@  discard block
 block discarded – undo
161 166
 				'Pending' => __( 'Unapproved', 'site-reviews' ),
162 167
 			];
163 168
 			foreach( $strings as $search => $replace ) {
164
-				if( strpos( $single, $search ) === false )continue;
169
+				if( strpos( $single, $search ) === false ) {
170
+					continue;
171
+				}
165 172
 				$translation = $this->getTranslation([
166 173
 					'number' => $number,
167 174
 					'plural' => str_replace( $search, $replace, $plural ),
@@ -213,7 +220,9 @@  discard block
 block discarded – undo
213 220
 	 */
214 221
 	public function saveBulkEditFields( $postId )
215 222
 	{
216
-		if( !current_user_can( 'edit_posts' ))return;
223
+		if( !current_user_can( 'edit_posts' )) {
224
+			return;
225
+		}
217 226
 		$assignedTo = filter_input( INPUT_GET, 'assigned_to' );
218 227
 		if( $assignedTo && get_post( $assignedTo )) {
219 228
 			update_post_meta( $postId, 'assigned_to', $assignedTo );
@@ -226,7 +235,9 @@  discard block
 block discarded – undo
226 235
 	 */
227 236
 	public function setQueryForColumn( WP_Query $query )
228 237
 	{
229
-		if( !$this->hasPermission( $query ))return;
238
+		if( !$this->hasPermission( $query )) {
239
+			return;
240
+		}
230 241
 		$this->setMetaQuery( $query, [
231 242
 			'rating', 'review_type',
232 243
 		]);
@@ -297,7 +308,9 @@  discard block
 block discarded – undo
297 308
 	protected function setMetaQuery( WP_Query $query, array $metaKeys )
298 309
 	{
299 310
 		foreach( $metaKeys as $key ) {
300
-			if( !( $value = filter_input( INPUT_GET, $key )))continue;
311
+			if( !( $value = filter_input( INPUT_GET, $key ))) {
312
+				continue;
313
+			}
301 314
 			$metaQuery = (array)$query->get( 'meta_query' );
302 315
 			$metaQuery[] = [
303 316
 				'key' => $key,
Please login to merge, or discard this patch.
plugin/Database.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,7 +70,9 @@  discard block
 block discarded – undo
70 70
 	public function getAssignedToPost( $post, $assignedTo = '' )
71 71
 	{
72 72
 		$post = get_post( $post );
73
-		if( !( $post instanceof WP_Post ))return;
73
+		if( !( $post instanceof WP_Post )) {
74
+			return;
75
+		}
74 76
 		if( empty( $assignedTo )) {
75 77
 			$assignedTo = get_post_meta( $post->ID, 'assigned_to', true );
76 78
 		}
@@ -88,7 +90,9 @@  discard block
 block discarded – undo
88 90
 	 */
89 91
 	public function getReview( $post )
90 92
 	{
91
-		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE )return;
93
+		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE ) {
94
+			return;
95
+		}
92 96
 		$review = $this->getReviewMeta( $post->ID );
93 97
 		$modified = $this->isReviewModified( $post, $review );
94 98
 		$review->content = $post->post_content;
@@ -262,7 +266,9 @@  discard block
 block discarded – undo
262 266
 		$termIds = array_map( 'trim', explode( ',', $termIds ));
263 267
 		foreach( $termIds as $termId ) {
264 268
 			$term = term_exists( $termId, Application::TAXONOMY );
265
-			if( !isset( $term['term_id'] ))continue;
269
+			if( !isset( $term['term_id'] )) {
270
+				continue;
271
+			}
266 272
 			$terms[] = intval( $term['term_id'] );
267 273
 		}
268 274
 		return $terms;
@@ -275,7 +281,9 @@  discard block
 block discarded – undo
275 281
 	public function revertReview( $postId )
276 282
 	{
277 283
 		$post = get_post( $postId );
278
-		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE )return;
284
+		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE ) {
285
+			return;
286
+		}
279 287
 		delete_post_meta( $post->ID, '_edit_last' );
280 288
 		$result = wp_update_post([
281 289
 			'ID' => $post->ID,
@@ -310,7 +318,9 @@  discard block
 block discarded – undo
310 318
 		add_filter( 'posts_search', [$queryBuilder, 'filterSearchByTitle'], 500, 2 );
311 319
 		$search = new WP_Query( $args );
312 320
 		remove_filter( 'posts_search', [$queryBuilder, 'filterSearchByTitle'], 500 );
313
-		if( !$search->have_posts() )return;
321
+		if( !$search->have_posts() ) {
322
+			return;
323
+		}
314 324
 		$results = '';
315 325
 		while( $search->have_posts() ) {
316 326
 			$search->the_post();
@@ -334,7 +344,9 @@  discard block
 block discarded – undo
334 344
 	public function setReviewMeta( $postId, $termIds )
335 345
 	{
336 346
 		$terms = $this->normalizeTerms( $termIds );
337
-		if( empty( $terms ))return;
347
+		if( empty( $terms )) {
348
+			return;
349
+		}
338 350
 		$result = wp_set_object_terms( $postId, $terms, Application::TAXONOMY );
339 351
 		if( is_wp_error( $result )) {
340 352
 			glsr_log()->error( $result->get_error_message() );
Please login to merge, or discard this patch.
plugin/Modules/Editor/Labels.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@
 block discarded – undo
48 48
 	public function filterUpdateMessages( array $messages )
49 49
 	{
50 50
 		$post = get_post();
51
-		if( !( $post instanceof WP_Post ))return;
51
+		if( !( $post instanceof WP_Post )) {
52
+			return;
53
+		}
52 54
 		$strings = $this->getReviewLabels();
53 55
 		$restored = filter_input( INPUT_GET, 'revision' );
54 56
 		if( $revisionTitle = wp_post_revision_title( intval( $restored ), false )) {
Please login to merge, or discard this patch.
plugin/Controllers/EditorController.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -118,7 +118,9 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function registerMetaBoxes( $postType )
120 120
 	{
121
-		if( $postType != Application::POST_TYPE )return;
121
+		if( $postType != Application::POST_TYPE ) {
122
+			return;
123
+		}
122 124
 		add_meta_box( Application::ID.'_assigned_to', __( 'Assigned To', 'site-reviews' ), [$this, 'renderAssignedToMetabox'], null, 'side' );
123 125
 		add_meta_box( Application::ID.'_review', __( 'Details', 'site-reviews' ), [$this, 'renderDetailsMetaBox'], null, 'side' );
124 126
 		add_meta_box( Application::ID.'_response', __( 'Respond Publicly', 'site-reviews' ), [$this, 'renderResponseMetaBox'], null, 'normal' );
@@ -148,7 +150,9 @@  discard block
 block discarded – undo
148 150
 	 */
149 151
 	public function renderAssignedToMetabox( WP_Post $post )
150 152
 	{
151
-		if( !$this->isReviewPostType( $post ))return;
153
+		if( !$this->isReviewPostType( $post )) {
154
+			return;
155
+		}
152 156
 		$assignedTo = (string)get_post_meta( $post->ID, 'assigned_to', true );
153 157
 		wp_nonce_field( 'assigned_to', '_nonce-assigned-to', false );
154 158
 		glsr()->render( 'partials/editor/metabox-assigned-to', [
@@ -163,7 +167,9 @@  discard block
 block discarded – undo
163 167
 	 */
164 168
 	public function renderDetailsMetaBox( WP_Post $post )
165 169
 	{
166
-		if( !$this->isReviewPostType( $post ))return;
170
+		if( !$this->isReviewPostType( $post )) {
171
+			return;
172
+		}
167 173
 		$review = glsr( Database::class )->getReview( $post );
168 174
 		glsr()->render( 'partials/editor/metabox-details', [
169 175
 			'button' => $this->buildDetailsMetaBoxRevertButton( $review, $post ),
@@ -177,7 +183,9 @@  discard block
 block discarded – undo
177 183
 	 */
178 184
 	public function renderPinnedInPublishMetaBox()
179 185
 	{
180
-		if( !$this->isReviewPostType( get_post() ))return;
186
+		if( !$this->isReviewPostType( get_post() )) {
187
+			return;
188
+		}
181 189
 		glsr( Html::class )->renderTemplate( 'partials/editor/pinned', [
182 190
 			'context' => [
183 191
 				'no' => __( 'No', 'site-reviews' ),
@@ -193,7 +201,9 @@  discard block
 block discarded – undo
193 201
 	 */
194 202
 	public function renderResponseMetaBox( WP_Post $post )
195 203
 	{
196
-		if( !$this->isReviewPostType( $post ))return;
204
+		if( !$this->isReviewPostType( $post )) {
205
+			return;
206
+		}
197 207
 		wp_nonce_field( 'response', '_nonce-response', false );
198 208
 		glsr()->render( 'partials/editor/metabox-response', [
199 209
 			'response' => glsr( Database::class )->getReview( $post )->response,
@@ -207,7 +217,9 @@  discard block
 block discarded – undo
207 217
 	 */
208 218
 	public function renderTaxonomyMetabox( WP_Post $post )
209 219
 	{
210
-		if( !$this->isReviewPostType( $post ))return;
220
+		if( !$this->isReviewPostType( $post )) {
221
+			return;
222
+		}
211 223
 		glsr()->render( 'partials/editor/metabox-categories', [
212 224
 			'post' => $post,
213 225
 			'tax_name' => Application::TAXONOMY,
@@ -245,7 +257,9 @@  discard block
 block discarded – undo
245 257
 	protected function buildAssignedToTemplate( $assignedTo, WP_Post $post )
246 258
 	{
247 259
 		$assignedPost = glsr( Database::class )->getAssignedToPost( $post, $assignedTo );
248
-		if( !( $assignedPost instanceof WP_Post ))return;
260
+		if( !( $assignedPost instanceof WP_Post )) {
261
+			return;
262
+		}
249 263
 		return glsr( Html::class )->buildTemplate( 'partials/editor/assigned-post', [
250 264
 			'context' => [
251 265
 				'data.url' => (string)get_permalink( $assignedPost ),
@@ -287,7 +301,9 @@  discard block
 block discarded – undo
287 301
 	 */
288 302
 	protected function getReviewType( $review )
289 303
 	{
290
-		if( count( glsr()->reviewTypes ) < 2 )return;
304
+		if( count( glsr()->reviewTypes ) < 2 ) {
305
+			return;
306
+		}
291 307
 		$reviewType = array_key_exists( $review->review_type, glsr()->reviewTypes )
292 308
 			? glsr()->reviewTypes[$review->review_type]
293 309
 			: __( 'Unknown', 'site-reviews' );
Please login to merge, or discard this patch.
plugin/Modules/Html/Partials/Pagination.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,13 +19,17 @@  discard block
 block discarded – undo
19 19
 	public function build( array $args = [] )
20 20
 	{
21 21
 		$this->args = $this->normalize( $args );
22
-		if( $this->args['total'] < 2 )return;
22
+		if( $this->args['total'] < 2 ) {
23
+			return;
24
+		}
23 25
 		$links = $this->buildLinksForDeprecatedThemes();
24 26
 		if( empty( $links )) {
25 27
 			$links = $this->buildLinks();
26 28
 		}
27 29
 		$links = apply_filters( 'site-reviews/reviews/navigation_links', $links, $this->args );
28
-		if( empty( $links ))return;
30
+		if( empty( $links )) {
31
+			return;
32
+		}
29 33
 		return $this->buildTemplate( $links );
30 34
 	}
31 35
 
@@ -55,7 +59,9 @@  discard block
 block discarded – undo
55 59
 	protected function buildLinksForDeprecatedThemes()
56 60
 	{
57 61
 		$theme = wp_get_theme()->get( 'TextDomain' );
58
-		if( !in_array( $theme, ['twentyten','twentyeleven','twentytwelve','twentythirteen'] ))return;
62
+		if( !in_array( $theme, ['twentyten','twentyeleven','twentytwelve','twentythirteen'] )) {
63
+			return;
64
+		}
59 65
 		$links = '';
60 66
 		if( $this->args['paged'] > 1 ) {
61 67
 			$links.= sprintf( '<div class="nav-previous"><a href="%s"><span class="meta-nav">&larr;</span> %s</a></div>',
Please login to merge, or discard this patch.
plugin/Handlers/EnqueuePublicAssets.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@
 block discarded – undo
48 48
 	 */
49 49
 	public function enqueueRecaptchaScript()
50 50
 	{
51
-		if( glsr( OptionManager::class )->get( 'settings.submissions.recaptcha.integration' ) != 'custom' )return;
51
+		if( glsr( OptionManager::class )->get( 'settings.submissions.recaptcha.integration' ) != 'custom' ) {
52
+			return;
53
+		}
52 54
 		$language = apply_filters( 'site-reviews/recaptcha/language', get_locale() );
53 55
 		wp_enqueue_script( Application::ID.'/google-recaptcha', add_query_arg([
54 56
 			'hl' => $language,
Please login to merge, or discard this patch.
plugin/Modules/Html/Partials/SiteReviewsSummary.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@  discard block
 block discarded – undo
34 34
 	{
35 35
 		$this->args = $args;
36 36
 		$this->reviews = glsr( Database::class )->getReviews( $args )->results;
37
-		if( empty( $this->reviews ) && $this->isHidden( 'if_empty' ))return;
37
+		if( empty( $this->reviews ) && $this->isHidden( 'if_empty' )) {
38
+			return;
39
+		}
38 40
 		$this->rating = glsr( Rating::class )->getAverage( $this->reviews );
39 41
 		$this->generateSchema();
40 42
 		return glsr( Template::class )->build( 'templates/reviews-summary', [
@@ -54,7 +56,9 @@  discard block
 block discarded – undo
54 56
 	 */
55 57
 	protected function buildPercentage()
56 58
 	{
57
-		if( $this->isHidden( 'bars' ))return;
59
+		if( $this->isHidden( 'bars' )) {
60
+			return;
61
+		}
58 62
 		$range = range( Rating::MAX_RATING, 1 );
59 63
 		$percentages = preg_filter( '/$/', '%', glsr( Rating::class )->getPercentages( $this->reviews ));
60 64
 		$bars = array_reduce( $range, function( $carry, $level ) use( $percentages ) {
@@ -104,7 +108,9 @@  discard block
 block discarded – undo
104 108
 	 */
105 109
 	protected function buildRating()
106 110
 	{
107
-		if( $this->isHidden( 'rating' ))return;
111
+		if( $this->isHidden( 'rating' )) {
112
+			return;
113
+		}
108 114
 		return $this->wrap( 'rating', '<span>'.$this->rating.'</span>' );
109 115
 	}
110 116
 
@@ -113,7 +119,9 @@  discard block
 block discarded – undo
113 119
 	 */
114 120
 	protected function buildStars()
115 121
 	{
116
-		if( $this->isHidden( 'stars' ))return;
122
+		if( $this->isHidden( 'stars' )) {
123
+			return;
124
+		}
117 125
 		$stars = glsr( Partial::class )->build( 'star-rating', [
118 126
 			'rating' => $this->rating,
119 127
 		]);
@@ -125,7 +133,9 @@  discard block
 block discarded – undo
125 133
 	 */
126 134
 	protected function buildText()
127 135
 	{
128
-		if( $this->isHidden( 'summary' ))return;
136
+		if( $this->isHidden( 'summary' )) {
137
+			return;
138
+		}
129 139
 		$count = count( $this->reviews );
130 140
 		if( empty( $this->args['text'] )) {
131 141
 			 $this->args['text'] = _nx(
@@ -146,7 +156,9 @@  discard block
 block discarded – undo
146 156
 	 */
147 157
 	protected function generateSchema()
148 158
 	{
149
-		if( !wp_validate_boolean( $this->args['schema'] ))return;
159
+		if( !wp_validate_boolean( $this->args['schema'] )) {
160
+			return;
161
+		}
150 162
 		glsr( Schema::class )->store(
151 163
 			glsr( Schema::class )->buildSummary( $this->args )
152 164
 		);
Please login to merge, or discard this patch.
plugin/Modules/Html/Partials/SiteReviews.php 1 patch
Braces   +33 added lines, -11 removed lines patch added patch discarded remove patch
@@ -83,7 +83,9 @@  discard block
 block discarded – undo
83 83
 		$generatedReview = [];
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
 			$generatedReview[$key] = $this->$method( $key, $value );
88 90
 		}
89 91
 		return (object)$generatedReview;
@@ -96,9 +98,13 @@  discard block
 block discarded – undo
96 98
 	 */
97 99
 	protected function buildOptionAssignedTo( $key, $value )
98 100
 	{
99
-		if( $this->isHiddenOrEmpty( $key, 'settings.reviews.assigned_links.enabled' ))return;
101
+		if( $this->isHiddenOrEmpty( $key, 'settings.reviews.assigned_links.enabled' )) {
102
+			return;
103
+		}
100 104
 		$post = get_post( intval( $value ));
101
-		if( !( $post instanceof WP_Post ))return;
105
+		if( !( $post instanceof WP_Post )) {
106
+			return;
107
+		}
102 108
 		$permalink = glsr( Builder::class )->a( get_the_title( $post->ID ), [
103 109
 			'href' => get_the_permalink( $post->ID ),
104 110
 		]);
@@ -113,7 +119,9 @@  discard block
 block discarded – undo
113 119
 	 */
114 120
 	protected function buildOptionAuthor( $key, $value )
115 121
 	{
116
-		if( $this->isHidden( $key ))return;
122
+		if( $this->isHidden( $key )) {
123
+			return;
124
+		}
117 125
 		$prefix = !$this->isOptionEnabled( 'settings.reviews.avatars.enabled' )
118 126
 			? apply_filters( 'site-reviews/review/author/prefix', '&mdash;' )
119 127
 			: '';
@@ -127,7 +135,9 @@  discard block
 block discarded – undo
127 135
 	 */
128 136
 	protected function buildOptionAvatar( $key, $value )
129 137
 	{
130
-		if( $this->isHidden( $key, 'settings.reviews.avatars.enabled' ))return;
138
+		if( $this->isHidden( $key, 'settings.reviews.avatars.enabled' )) {
139
+			return;
140
+		}
131 141
 		$size = $this->getOption( 'settings.reviews.avatars.size', 40 );
132 142
 		return $this->wrap( $key, glsr( Builder::class )->img([
133 143
 			'src' => $this->generateAvatar( $value ),
@@ -144,7 +154,9 @@  discard block
 block discarded – undo
144 154
 	protected function buildOptionContent( $key, $value )
145 155
 	{
146 156
 		$text = $this->normalizeText( $value );
147
-		if( $this->isHiddenOrEmpty( $key, $text ))return;
157
+		if( $this->isHiddenOrEmpty( $key, $text )) {
158
+			return;
159
+		}
148 160
 		return $this->wrap( $key, '<p>'.$text.'</p>' );
149 161
 	}
150 162
 
@@ -155,7 +167,9 @@  discard block
 block discarded – undo
155 167
 	 */
156 168
 	protected function buildOptionDate( $key, $value )
157 169
 	{
158
-		if( $this->isHidden( $key ))return;
170
+		if( $this->isHidden( $key )) {
171
+			return;
172
+		}
159 173
 		$dateFormat = $this->getOption( 'settings.reviews.date.format', 'default' );
160 174
 		if( $dateFormat == 'relative' ) {
161 175
 			$date = glsr( Date::class )->relative( $value );
@@ -176,7 +190,9 @@  discard block
 block discarded – undo
176 190
 	 */
177 191
 	protected function buildOptionRating( $key, $value )
178 192
 	{
179
-		if( $this->isHiddenOrEmpty( $key, $value ))return;
193
+		if( $this->isHiddenOrEmpty( $key, $value )) {
194
+			return;
195
+		}
180 196
 		$rating = glsr( Html::class )->buildPartial( 'star-rating', [
181 197
 			'rating' => $value,
182 198
 		]);
@@ -190,7 +206,9 @@  discard block
 block discarded – undo
190 206
 	 */
191 207
 	protected function buildOptionResponse( $key, $value )
192 208
 	{
193
-		if( $this->isHiddenOrEmpty( $key, $value ))return;
209
+		if( $this->isHiddenOrEmpty( $key, $value )) {
210
+			return;
211
+		}
194 212
 		$title = sprintf( __( 'Response from %s', 'site-reviews' ), get_bloginfo( 'name' ));
195 213
 		$text = $this->normalizeText( $value );
196 214
 		$text = '<p><strong>'.$title.'</strong></p><p>'.$text.'</p>';
@@ -207,7 +225,9 @@  discard block
 block discarded – undo
207 225
 	 */
208 226
 	protected function buildOptionTitle( $key, $value )
209 227
 	{
210
-		if( $this->isHidden( $key ))return;
228
+		if( $this->isHidden( $key )) {
229
+			return;
230
+		}
211 231
 		if( empty( $value )) {
212 232
 			$value = __( 'No Title', 'site-reviews' );
213 233
 		}
@@ -237,7 +257,9 @@  discard block
 block discarded – undo
237 257
 	 */
238 258
 	protected function generateSchema()
239 259
 	{
240
-		if( !wp_validate_boolean( $this->args['schema'] ))return;
260
+		if( !wp_validate_boolean( $this->args['schema'] )) {
261
+			return;
262
+		}
241 263
 		glsr( Schema::class )->store(
242 264
 			glsr( Schema::class )->build( $this->args )
243 265
 		);
Please login to merge, or discard this patch.