Completed
Pull Request — develop (#1553)
by Naveen
01:01
created
src/wordlift/faq/class-faq-to-jsonld-converter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
 				array_push($jsonld['@type'], self::FAQ_JSONLD_TYPE);
44 44
 				return $jsonld;
45 45
 			}
46
-		}
47
-		else {
46
+		} else {
48 47
 			$jsonld['@type'] = array(self::FAQ_JSONLD_TYPE);
49 48
 		}
50 49
 		return $jsonld;
Please login to merge, or discard this patch.
src/wordlift/faq/class-faq-rest-controller.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -195,8 +195,7 @@
 block discarded – undo
195 195
 				$deleted_faq_item['answer'] = '';
196 196
 				$new_value = $deleted_faq_item;
197 197
 				update_post_meta($post_id, self::FAQ_META_KEY, $new_value, $previous_value);
198
-			}
199
-			else if ( $faq_item['field_to_be_deleted'] === self::QUESTION) {
198
+			} else if ( $faq_item['field_to_be_deleted'] === self::QUESTION) {
200 199
 				/**
201 200
 				 * If the question is deleted, then delete the faq item.
202 201
 				 */
Please login to merge, or discard this patch.
src/includes/class-wordlift-autocomplete-adapter.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,10 +77,12 @@
 block discarded – undo
77 77
 		$show_local_entities = false;
78 78
 
79 79
 		if ( isset( $_REQUEST['show_local_entities'] )
80
-		     && ! empty( $_REQUEST['show_local_entities'] ) ) // Make request.
80
+		     && ! empty( $_REQUEST['show_local_entities'] ) ) {
81
+		    // Make request.
81 82
 		{
82 83
 			$show_local_entities = filter_var( $_REQUEST['show_local_entities'], FILTER_VALIDATE_BOOLEAN );
83 84
 		}
85
+		}
84 86
 
85 87
 		// Add the filter to check if we need to show local entities or not.
86 88
 		add_filter( 'wl_show_local_entities', function ( $state ) use ( $show_local_entities ) {
Please login to merge, or discard this patch.
src/wordlift/metabox/field/store/class-store-factory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
 
23 23
 		if ( Object_Type_Enum::POST === $type ) {
24 24
 			return new Post_Store();
25
-		}
26
-		else if ( Object_Type_Enum::TERM === $type) {
25
+		} else if ( Object_Type_Enum::TERM === $type) {
27 26
 			return new Term_Store();
28 27
 		}
29 28
 		return null;
Please login to merge, or discard this patch.
src/includes/class-wordlift-jsonld-service.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -200,8 +200,7 @@
 block discarded – undo
200 200
 			    $term_jsonld =  $that->term_jsonld_adapter->get( $item->get_id(), $context );
201 201
 			    // For term references, we publish a jsonld array on the page, use only the first item.
202 202
 			    return count( $term_jsonld ) > 0 ? $term_jsonld[0] : false;
203
-			}
204
-			else if ( $item instanceof  Post_Reference) {
203
+			} else if ( $item instanceof  Post_Reference) {
205 204
 			    $item = $item->get_id();
206 205
             }
207 206
 
Please login to merge, or discard this patch.
src/includes/properties/class-wordlift-simple-property-service.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@
 block discarded – undo
37 37
 		if ( Object_Type_Enum::POST === $type ) {
38 38
 			// Get the value stored in WP.
39 39
 			return get_post_meta( $id, $meta_key );
40
-		}
41
-		else if ( Object_Type_Enum::TERM === $type ) {
40
+		} else if ( Object_Type_Enum::TERM === $type ) {
42 41
 			return get_term_meta( $id, $meta_key );
43 42
 		}
44 43
 		return null;
Please login to merge, or discard this patch.
src/wordlift/videoobject/provider/client/class-client-factory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
 			return Youtube_Client::get_instance();
20 20
 		} else if ( self::VIMEO === $config ) {
21 21
 			return Vimeo_Client::get_instance();
22
-		}
23
-		else if ( self::JWPLAYER === $config ) {
22
+		} else if ( self::JWPLAYER === $config ) {
24 23
 			return Jw_Player_Client::get_instance();
25 24
 		}
26 25
 
Please login to merge, or discard this patch.
src/wordlift/videoobject/provider/class-provider-factory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
 			return new Youtube( Client_Factory::get_client( Client_Factory::YOUTUBE ) );
23 23
 		} else if (  self::VIMEO === $provider_name ) {
24 24
 			return new Vimeo( Client_Factory::get_client( Client_Factory::VIMEO ) );
25
-		}
26
-		else if ( self::JWPLAYER === $provider_name ) {
25
+		} else if ( self::JWPLAYER === $provider_name ) {
27 26
 			return new Jw_Player( Client_Factory::get_client( Client_Factory::JWPLAYER ) );
28 27
 		}
29 28
 
Please login to merge, or discard this patch.