Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 1 |
DummySparqlHelper | |
0.00% |
0 / 6 |
|
0.00% |
0 / 6 |
42 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
hasType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
findEntitiesWithSameStatement | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
findEntitiesWithSameQualifierOrReference | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
matchesRegularExpression | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
runQuery | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare( strict_types = 1 ); |
4 | |
5 | namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Helper; |
6 | |
7 | use LogicException; |
8 | use Wikibase\DataModel\Entity\EntityId; |
9 | use Wikibase\DataModel\Snak\PropertyValueSnak; |
10 | use Wikibase\DataModel\Statement\Statement; |
11 | use WikibaseQuality\ConstraintReport\ConstraintCheck\Cache\CachedBool; |
12 | use WikibaseQuality\ConstraintReport\ConstraintCheck\Cache\CachedEntityIds; |
13 | use WikibaseQuality\ConstraintReport\ConstraintCheck\Cache\CachedQueryResults; |
14 | |
15 | /** |
16 | * A fake {@link SparqlHelper} that only serves as a default implementation |
17 | * for {@link WikibaseQuality\ConstraintReport\ConstraintsServices ConstraintsServices}. |
18 | * |
19 | * TODO: SparqlHelper should be refactored so that this isn’t necessary. |
20 | * See T196053#4514308 for details. |
21 | * |
22 | * @license GPL-2.0-or-later |
23 | * @phan-file-suppress PhanPluginNeverReturnMethod |
24 | */ |
25 | class DummySparqlHelper extends SparqlHelper { |
26 | |
27 | public function __construct() { |
28 | // no parent::__construct() call |
29 | } |
30 | |
31 | public function hasType( string $id, array $classes ): CachedBool { |
32 | throw new LogicException( 'methods of this class should never be called' ); |
33 | } |
34 | |
35 | public function findEntitiesWithSameStatement( |
36 | Statement $statement, |
37 | array $separators |
38 | ): CachedEntityIds { |
39 | throw new LogicException( 'methods of this class should never be called' ); |
40 | } |
41 | |
42 | public function findEntitiesWithSameQualifierOrReference( |
43 | EntityId $entityId, |
44 | PropertyValueSnak $snak, |
45 | string $type, |
46 | bool $ignoreDeprecatedStatements |
47 | ): CachedEntityIds { |
48 | throw new LogicException( 'methods of this class should never be called' ); |
49 | } |
50 | |
51 | public function matchesRegularExpression( string $text, string $regex ): bool { |
52 | throw new LogicException( 'methods of this class should never be called' ); |
53 | } |
54 | |
55 | public function runQuery( string $query, string $endpoint, bool $needsPrefixes = true ): CachedQueryResults { |
56 | throw new LogicException( 'methods of this class should never be called' ); |
57 | } |
58 | |
59 | } |