Completed
Push — master ( c83719...6a6753 )
by
unknown
02:45
created

DummySparqlHelper::runQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Helper;
4
5
use LogicException;
6
use Wikibase\DataModel\Entity\EntityId;
7
use Wikibase\DataModel\Snak\PropertyValueSnak;
8
use Wikibase\DataModel\Statement\Statement;
9
10
/**
11
 * A fake {@link SparqlHelper} that only serves as a default implementation
12
 * for {@link WikibaseQuality\ConstraintReport\ConstraintsServices ConstraintsServices}.
13
 *
14
 * TODO: SparqlHelper should be refactored so that this isn’t necessary.
15
 * See T196053#4514308 for details.
16
 *
17
 * @license GPL-2.0-or-later
18
 */
19
class DummySparqlHelper extends SparqlHelper {
20
21
	public function __construct() {
22
		// no parent::__construct() call
23
	}
24
25
	public function hasType( $id, array $classes, $withInstance ) {
26
		throw new LogicException( 'methods of this class should never be called' );
27
	}
28
29
	public function findEntitiesWithSameStatement(
30
		Statement $statement,
31
		$ignoreDeprecatedStatements
32
	) {
33
		throw new LogicException( 'methods of this class should never be called' );
34
	}
35
36
	public function findEntitiesWithSameQualifierOrReference(
37
		EntityId $entityId,
38
		PropertyValueSnak $snak,
39
		$type,
40
		$ignoreDeprecatedStatements
41
	) {
42
		throw new LogicException( 'methods of this class should never be called' );
43
	}
44
45
	public function matchesRegularExpression( $text, $regex ) {
46
		throw new LogicException( 'methods of this class should never be called' );
47
	}
48
49
	public function runQuery( $query ) {
50
		throw new LogicException( 'methods of this class should never be called' );
51
	}
52
53
}
54