Skip to content

Commit c92e03c

Browse files
jakobwWMDE bot
authored andcommitted
Use mediawiki-phan-config 0.16.0
The majority of issues were related to exception handling (unused exception variable, missing @throws annotation etc), and straightforward to fix. Bug: T398459 Change-Id: I5a459fd4c45eb73439ade6cca29109370468a495
1 parent 170776c commit c92e03c

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/DataValue/ValuesFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function findFromSnaks( array $snaks, $dataType ) {
6767
private function isMatchingDataType( PropertyId $propertyId, $dataType ) {
6868
try {
6969
return $this->propertyDataTypeLookup->getDataTypeIdForProperty( $propertyId ) === $dataType;
70-
} catch ( PropertyDataTypeLookupException $ex ) {
70+
} catch ( PropertyDataTypeLookupException ) {
7171
return false;
7272
}
7373
}

src/Entity/PropertyDataTypeMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct( PropertyDataTypeLookup $propertyDataTypeLookup ) {
3636
public function isMatchingDataType( PropertyId $propertyId, $dataType ) {
3737
try {
3838
return $this->findDataTypeIdForProperty( $propertyId ) === $dataType;
39-
} catch ( PropertyDataTypeLookupException $ex ) {
39+
} catch ( PropertyDataTypeLookupException ) {
4040
return false;
4141
}
4242
}

src/EntityId/EntityIdLabelFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function formatEntityId( EntityId $entityId ) {
5151
protected function lookupEntityLabel( EntityId $entityId ) {
5252
try {
5353
return $this->labelLookup->getLabel( $entityId );
54-
} catch ( LabelDescriptionLookupException $e ) {
54+
} catch ( LabelDescriptionLookupException ) {
5555
return null;
5656
}
5757
}

src/Lookup/ExceptionIgnoringEntityLookup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct( EntityLookup $lookup ) {
3333
public function getEntity( EntityId $entityId ) {
3434
try {
3535
return $this->lookup->getEntity( $entityId );
36-
} catch ( EntityLookupException $exception ) {
36+
} catch ( EntityLookupException ) {
3737
return null;
3838
}
3939
}

src/Statement/Filter/DataTypeStatementFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function statementMatches( Statement $statement ) {
5454

5555
try {
5656
$dataType = $this->dataTypeLookup->getDataTypeIdForProperty( $id );
57-
} catch ( PropertyDataTypeLookupException $ex ) {
57+
} catch ( PropertyDataTypeLookupException ) {
5858
return false;
5959
}
6060

src/Statement/StatementGuidValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private function validateStatementGuidPrefix( $prefixedId ) {
9898
try {
9999
$this->entityIdParser->parse( $prefixedId );
100100
return true;
101-
} catch ( EntityIdParsingException $ex ) {
101+
} catch ( EntityIdParsingException ) {
102102
return false;
103103
}
104104
}

0 commit comments

Comments
 (0)