Engine   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getMatchingEntities() 0 3 1
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