Passed
Push — master ( 75834f...73b77e )
by Paul
04:12
created
plugin/Modules/Schema.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@  discard block
 block discarded – undo
34 34
 		foreach( glsr( Database::class )->getReviews( $this->args )->results as $review ) {
35 35
 			// Only include critic reviews that have been directly produced by your site, not reviews from third- party sites or syndicated reviews.
36 36
 			// @see https://developers.google.com/search/docs/data-types/review
37
-			if( $review->review_type != 'local' )continue;
37
+			if( $review->review_type != 'local' ) {
38
+				continue;
39
+			}
38 40
 			$reviews[] = $this->buildReview( $review );
39 41
 		}
40 42
 		if( !empty( $reviews )) {
@@ -79,7 +81,9 @@  discard block
 block discarded – undo
79 81
 	 */
80 82
 	public function render()
81 83
 	{
82
-		if( is_null( glsr()->schemas ))return;
84
+		if( is_null( glsr()->schemas )) {
85
+			return;
86
+		}
83 87
 		printf( '<script type="application/ld+json">%s</script>', json_encode(
84 88
 			apply_filters( 'site-reviews/schema/all', glsr()->schemas ),
85 89
 			JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
@@ -129,7 +133,9 @@  discard block
 block discarded – undo
129 133
 	{
130 134
 		foreach( $values as $value ) {
131 135
 			$option = $this->getSchemaOptionValue( $value );
132
-			if( empty( $option ))continue;
136
+			if( empty( $option )) {
137
+				continue;
138
+			}
133 139
 			$schema->$value( $option );
134 140
 		}
135 141
 		return $schema;
@@ -243,7 +249,9 @@  discard block
 block discarded – undo
243 249
 		if( $value != $fallback ) {
244 250
 			return $value;
245 251
 		}
246
-		if( !is_single() && !is_page() )return;
252
+		if( !is_single() && !is_page() ) {
253
+			return;
254
+		}
247 255
 		// @todo make this dynamic
248 256
 		switch( $option ) {
249 257
 			case 'description':
Please login to merge, or discard this patch.