Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
DummySparqlHelper
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 6
42
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 hasType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 findEntitiesWithSameStatement
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 findEntitiesWithSameQualifierOrReference
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 matchesRegularExpression
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 runQuery
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Helper;
4
5use LogicException;
6use Wikibase\DataModel\Entity\EntityId;
7use Wikibase\DataModel\Snak\PropertyValueSnak;
8use 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 * @phan-file-suppress PhanPluginNeverReturnMethod
19 */
20class DummySparqlHelper extends SparqlHelper {
21
22    public function __construct() {
23        // no parent::__construct() call
24    }
25
26    public function hasType( $id, array $classes ) {
27        throw new LogicException( 'methods of this class should never be called' );
28    }
29
30    public function findEntitiesWithSameStatement(
31        Statement $statement,
32        array $separators
33    ) {
34        throw new LogicException( 'methods of this class should never be called' );
35    }
36
37    public function findEntitiesWithSameQualifierOrReference(
38        EntityId $entityId,
39        PropertyValueSnak $snak,
40        $type,
41        $ignoreDeprecatedStatements
42    ) {
43        throw new LogicException( 'methods of this class should never be called' );
44    }
45
46    public function matchesRegularExpression( $text, $regex ) {
47        throw new LogicException( 'methods of this class should never be called' );
48    }
49
50    public function runQuery( $query, $needsPrefixes = true ) {
51        throw new LogicException( 'methods of this class should never be called' );
52    }
53
54}