Debian Codegraph @

extensions/Math/tests/phpunit/DummyPropertyDataTypeLookup.php

raw symbols SCIP
1 <?php
2
3 use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup;
4
5 class DummyPropertyDataTypeLookup implements PropertyDataTypeLookup {
6 /**
7 * @var int
8 */
9 public static $mathId = 1;
10
11 /**
12 * Returns the data type for the Property of which the id is given.
13 *
14 * @since 2.0
15 *
16 * @param \Wikibase\DataModel\Entity\PropertyId $propertyId
17 *
18 * @return string
19 * @throws \Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookupException
20 */
21 public function getDataTypeIdForProperty( \Wikibase\DataModel\Entity\PropertyId $propertyId ) {
22 return $propertyId->getNumericId() == self::$mathId ? 'math' : 'not-math';
23 }
24 }