Engine::getMatchingEntities()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Wikibase\QueryEngine\SQLStore\Engine;
4
5
use Ask\Language\Description\Description;
6
use Ask\Language\Option\QueryOptions;
7
use Wikibase\DataModel\Entity\EntityId;
8
use Wikibase\QueryEngine\QueryEngine;
9
10
/**
11
 * Simple query engine that works on top of the SQLStore.
12
 *
13
 * @since 0.1
14
 *
15
 * @licence GNU GPL v2+
16
 * @author Jeroen De Dauw < [email protected] >
17
 */
18
class Engine implements QueryEngine {
19
20
	private $matchFinder;
21
22
	public function __construct( DescriptionMatchFinder $matchFinder ) {
23
		$this->matchFinder = $matchFinder;
24
	}
25
26
	/**
27
	 * @see QueryEngine::getMatchingEntities
28
	 *
29
	 * @param Description $description
30
	 * @param QueryOptions $options
31
	 *
32
	 * @return EntityId[]
33
	 */
34
	public function getMatchingEntities( Description $description, QueryOptions $options ) {
35
		return $this->matchFinder->findMatchingEntities( $description, $options );
36
	}
37
38
}
39