@@ -162,7 +162,7 @@ |
||
| 162 | 162 | /** |
| 163 | 163 | * Writes output for CrossCheckResultList |
| 164 | 164 | * |
| 165 | - * @param array $resultLists |
|
| 165 | + * @param \WikibaseQuality\ExternalValidation\CrossCheck\Result\CrossCheckResultList[] $resultLists |
|
| 166 | 166 | * |
| 167 | 167 | * @return array |
| 168 | 168 | */ |
@@ -288,7 +288,7 @@ |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | /** |
| 291 | - * @param array $strings |
|
| 291 | + * @param string[] $strings |
|
| 292 | 292 | * @param string $parameterName |
| 293 | 293 | * |
| 294 | 294 | * @throws InvalidArgumentException |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | /** |
| 202 | 202 | * @param EntityDocument $entity |
| 203 | 203 | * |
| 204 | - * @return CrossCheckResultList|null |
|
| 204 | + * @return \WikibaseQuality\ExternalValidation\CrossCheck\Result\CrossCheckResultList|null |
|
| 205 | 205 | */ |
| 206 | 206 | private function getCrossCheckResultsFromEntity( EntityDocument $entity ) { |
| 207 | 207 | if ( $entity instanceof StatementListProvider ) { |
@@ -47,7 +47,6 @@ |
||
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * @param TermLookup $termLookup |
| 50 | - * @param EntityTitleLookup $entityTitleLookup |
|
| 51 | 50 | * @param DumpMetaInformationLookup $dumpMetaInformationRepo |
| 52 | 51 | */ |
| 53 | 52 | public function __construct( |
@@ -283,8 +283,7 @@ discard block |
||
| 283 | 283 | $result = ComparisonResult::STATUS_MISMATCH; |
| 284 | 284 | if( in_array( ComparisonResult::STATUS_MATCH, $results ) ) { |
| 285 | 285 | $result = ComparisonResult::STATUS_MATCH; |
| 286 | - } |
|
| 287 | - elseif( in_array( ComparisonResult::STATUS_PARTIAL_MATCH, $results ) ) { |
|
| 286 | + } elseif( in_array( ComparisonResult::STATUS_PARTIAL_MATCH, $results ) ) { |
|
| 288 | 287 | $result = ComparisonResult::STATUS_PARTIAL_MATCH; |
| 289 | 288 | } |
| 290 | 289 | |
@@ -314,8 +313,7 @@ discard block |
||
| 314 | 313 | if( $parsedValue ) { |
| 315 | 314 | $parsedValues[] = $parsedValue; |
| 316 | 315 | } |
| 317 | - } |
|
| 318 | - catch( ParseException $e ) {} |
|
| 316 | + } catch( ParseException $e ) {} |
|
| 319 | 317 | } |
| 320 | 318 | |
| 321 | 319 | return $parsedValues; |
@@ -102,8 +102,7 @@ |
||
| 102 | 102 | $db->begin(); |
| 103 | 103 | $result = $db->insert( self::TABLE_NAME, $accumulator ); |
| 104 | 104 | $db->commit(); |
| 105 | - } |
|
| 106 | - catch( DBError $ex ) { |
|
| 105 | + } catch( DBError $ex ) { |
|
| 107 | 106 | $db->rollback(); |
| 108 | 107 | throw $ex; |
| 109 | 108 | } |
@@ -95,16 +95,14 @@ discard block |
||
| 95 | 95 | intval( $data[6] ), |
| 96 | 96 | new ItemId( $data[7] ) |
| 97 | 97 | ); |
| 98 | - } |
|
| 99 | - catch( \InvalidArgumentException $e ) { |
|
| 98 | + } catch( \InvalidArgumentException $e ) { |
|
| 100 | 99 | exit( 'Input file has bad formatted values.' ); |
| 101 | 100 | } |
| 102 | 101 | $dumpIds[] = $dumpMetaInformation->getDumpId(); |
| 103 | 102 | |
| 104 | 103 | try { |
| 105 | 104 | $this->dumpMetaInformationStore->save( $dumpMetaInformation ); |
| 106 | - } |
|
| 107 | - catch( \DBError $e ) { |
|
| 105 | + } catch( \DBError $e ) { |
|
| 108 | 106 | exit( 'Unknown database error occurred.' ); |
| 109 | 107 | } |
| 110 | 108 | |
@@ -138,8 +136,7 @@ discard block |
||
| 138 | 136 | if ( $data === false || ++$i % $this->importSettings->getBatchSize() === 0 ) { |
| 139 | 137 | try { |
| 140 | 138 | $this->externalDataRepo->insertBatch( $accumulator ); |
| 141 | - } |
|
| 142 | - catch( \DBError $e ) { |
|
| 139 | + } catch( \DBError $e ) { |
|
| 143 | 140 | exit( 'Unknown database error occurred.' ); |
| 144 | 141 | } |
| 145 | 142 | wfWaitForSlaves(); |