Code Duplication    Length = 9-10 lines in 2 locations

src/includes/class-wordlift-entity-uri-service.php 2 locations

@@ 106-115 (lines=10) @@
103
		// performed also looking at sameAs values.
104
		//
105
		// This solve issues like https://github.com/insideout10/wordlift-plugin/issues/237
106
		if ( 0 < count( $external_uris ) ) {
107
108
			$query_args['meta_query']['relation'] = 'OR';
109
			$query_args['meta_query'][]           = array(
110
				'key'     => Wordlift_Schema_Service::FIELD_SAME_AS,
111
				'value'   => $external_uris,
112
				'compare' => 'IN',
113
			);
114
115
		}
116
117
		// Get the posts.
118
		$posts = get_posts( $query_args );
@@ 188-196 (lines=9) @@
185
		// performed also looking at sameAs values.
186
		//
187
		// This solve issues like https://github.com/insideout10/wordlift-plugin/issues/237
188
		if ( ! $this->is_internal( $uri ) ) {
189
190
			$query_args['meta_query']['relation'] = 'OR';
191
			$query_args['meta_query'][]           = array(
192
				'key'     => Wordlift_Schema_Service::FIELD_SAME_AS,
193
				'value'   => $uri,
194
				'compare' => '=',
195
			);
196
		}
197
198
		$posts = get_posts( $query_args );
199