QueryEngineEntityHandler::getHandlingMessage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Queryr\Replicator\Importer\EntityHandlers;
4
5
use Queryr\Replicator\Importer\EntityHandler;
6
use Wikibase\DataModel\Entity\EntityDocument;
7
use Wikibase\QueryEngine\QueryStoreWriter;
8
9
/**
10
 * @licence GNU GPL v2+
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class QueryEngineEntityHandler implements EntityHandler {
14
15
	private $queryStoreWriter;
16
17
	public function __construct( QueryStoreWriter $queryStoreWriter ) {
18
		$this->queryStoreWriter = $queryStoreWriter;
19
	}
20
21
	public function handleEntity( EntityDocument $entity ) {
22
		$this->queryStoreWriter->updateEntity( $entity );
23
	}
24
25
	public function getHandlingMessage( EntityDocument $entity ): string {
26
		return 'Inserting into Query store';
27
	}
28
29
}