@@ -19,6 +19,6 @@ |
||
| 19 | 19 | * @return string Either plain text, wikitext or HTML. |
| 20 | 20 | * @throws \InvalidArgumentException when value falls out of supported patterns by the formatter |
| 21 | 21 | */ |
| 22 | - public function formatEntityId( EntityId $value ); |
|
| 22 | + public function formatEntityId(EntityId $value); |
|
| 23 | 23 | |
| 24 | 24 | } |
@@ -20,6 +20,6 @@ |
||
| 20 | 20 | /** |
| 21 | 21 | * @param mixed $position Round trips with method getPosition |
| 22 | 22 | */ |
| 23 | - public function setPosition( $position ); |
|
| 23 | + public function setPosition($position); |
|
| 24 | 24 | |
| 25 | 25 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | private $labelLookup; |
| 24 | 24 | |
| 25 | - public function __construct( LabelLookup $labelLookup ) { |
|
| 25 | + public function __construct(LabelLookup $labelLookup) { |
|
| 26 | 26 | $this->labelLookup = $labelLookup; |
| 27 | 27 | } |
| 28 | 28 | |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @return string Plain text |
| 35 | 35 | */ |
| 36 | - public function formatEntityId( EntityId $entityId ) { |
|
| 37 | - $term = $this->lookupEntityLabel( $entityId ); |
|
| 38 | - if ( $term !== null ) { |
|
| 36 | + public function formatEntityId(EntityId $entityId) { |
|
| 37 | + $term = $this->lookupEntityLabel($entityId); |
|
| 38 | + if ($term !== null) { |
|
| 39 | 39 | return $term->getText(); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | * |
| 49 | 49 | * @return Term|null Null if no label was found or the entity does not exist |
| 50 | 50 | */ |
| 51 | - protected function lookupEntityLabel( EntityId $entityId ) { |
|
| 51 | + protected function lookupEntityLabel(EntityId $entityId) { |
|
| 52 | 52 | try { |
| 53 | - return $this->labelLookup->getLabel( $entityId ); |
|
| 54 | - } catch ( LabelDescriptionLookupException $e ) { |
|
| 53 | + return $this->labelLookup->getLabel($entityId); |
|
| 54 | + } catch (LabelDescriptionLookupException $e) { |
|
| 55 | 55 | return null; |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -20,12 +20,12 @@ |
||
| 20 | 20 | * |
| 21 | 21 | * @param EntityId[] $entityIds |
| 22 | 22 | */ |
| 23 | - public function prefetch( array $entityIds ); |
|
| 23 | + public function prefetch(array $entityIds); |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Purges prefetched data about a given entity. |
| 27 | 27 | */ |
| 28 | - public function purge( EntityId $entityId ); |
|
| 28 | + public function purge(EntityId $entityId); |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Purges all prefetched data. |
@@ -21,13 +21,13 @@ |
||
| 21 | 21 | * |
| 22 | 22 | * @param EntityId[] $entityIds |
| 23 | 23 | */ |
| 24 | - public function prefetch( array $entityIds ) { |
|
| 24 | + public function prefetch(array $entityIds) { |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Purges prefetched data about a given entity. |
| 29 | 29 | */ |
| 30 | - public function purge( EntityId $entityId ) { |
|
| 30 | + public function purge(EntityId $entityId) { |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | private $propertyDataTypeLookup; |
| 23 | 23 | |
| 24 | - public function __construct( PropertyDataTypeLookup $propertyDataTypeLookup ) { |
|
| 24 | + public function __construct(PropertyDataTypeLookup $propertyDataTypeLookup) { |
|
| 25 | 25 | $this->propertyDataTypeLookup = $propertyDataTypeLookup; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @return bool |
| 35 | 35 | */ |
| 36 | - public function isMatchingDataType( PropertyId $propertyId, $dataType ) { |
|
| 36 | + public function isMatchingDataType(PropertyId $propertyId, $dataType) { |
|
| 37 | 37 | try { |
| 38 | - return $this->findDataTypeIdForProperty( $propertyId ) === $dataType; |
|
| 39 | - } catch ( PropertyDataTypeLookupException $ex ) { |
|
| 38 | + return $this->findDataTypeIdForProperty($propertyId) === $dataType; |
|
| 39 | + } catch (PropertyDataTypeLookupException $ex) { |
|
| 40 | 40 | return false; |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | * @return string |
| 48 | 48 | * @throws PropertyDataTypeLookupException |
| 49 | 49 | */ |
| 50 | - private function findDataTypeIdForProperty( PropertyId $propertyId ) { |
|
| 51 | - return $this->propertyDataTypeLookup->getDataTypeIdForProperty( $propertyId ); |
|
| 50 | + private function findDataTypeIdForProperty(PropertyId $propertyId) { |
|
| 51 | + return $this->propertyDataTypeLookup->getDataTypeIdForProperty($propertyId); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | } |
@@ -14,11 +14,11 @@ |
||
| 14 | 14 | * Updates the stored terms for the specified property. |
| 15 | 15 | * @throws TermStoreException |
| 16 | 16 | */ |
| 17 | - public function storeTerms( NumericPropertyId $propertyId, Fingerprint $terms ); |
|
| 17 | + public function storeTerms(NumericPropertyId $propertyId, Fingerprint $terms); |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @throws TermStoreException |
| 21 | 21 | */ |
| 22 | - public function deleteTerms( NumericPropertyId $propertyId ); |
|
| 22 | + public function deleteTerms(NumericPropertyId $propertyId); |
|
| 23 | 23 | |
| 24 | 24 | } |
@@ -14,11 +14,11 @@ |
||
| 14 | 14 | * Updates the stored terms for the specified item. |
| 15 | 15 | * @throws TermStoreException |
| 16 | 16 | */ |
| 17 | - public function storeTerms( ItemId $itemId, Fingerprint $terms ); |
|
| 17 | + public function storeTerms(ItemId $itemId, Fingerprint $terms); |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @throws TermStoreException |
| 21 | 21 | */ |
| 22 | - public function deleteTerms( ItemId $itemId ); |
|
| 22 | + public function deleteTerms(ItemId $itemId); |
|
| 23 | 23 | |
| 24 | 24 | } |
@@ -21,6 +21,6 @@ |
||
| 21 | 21 | * |
| 22 | 22 | * @return EntityId[] a map of strings from $labels to the corresponding entity ID. |
| 23 | 23 | */ |
| 24 | - public function getPropertyIdsForLabels( array $labels, $recache = '' ); |
|
| 24 | + public function getPropertyIdsForLabels(array $labels, $recache = ''); |
|
| 25 | 25 | |
| 26 | 26 | } |