Completed
Push — master ( 5c18d0...3ae30d )
by
unknown
05:18
created
src/ConstraintReportFactory.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	public static function getDefaultInstance() {
196 196
 		static $instance = null;
197 197
 
198
-		if ( $instance === null ) {
198
+		if ($instance === null) {
199 199
 			$wikibaseRepo = WikibaseRepo::getDefaultInstance();
200 200
 			$config = MediaWikiServices::getInstance()->getMainConfig();
201 201
 			$titleParser = MediaWikiServices::getInstance()->getTitleParser();
@@ -264,21 +264,21 @@  discard block
 block discarded – undo
264 264
 	 * @return DelegatingConstraintChecker
265 265
 	 */
266 266
 	public function getConstraintChecker() {
267
-		if ( $this->delegatingConstraintChecker === null ) {
267
+		if ($this->delegatingConstraintChecker === null) {
268 268
 			$this->delegatingConstraintChecker = new DelegatingConstraintChecker(
269 269
 				$this->lookup,
270 270
 				$this->getConstraintCheckerMap(),
271
-				new CachingConstraintLookup( $this->getConstraintRepository() ),
271
+				new CachingConstraintLookup($this->getConstraintRepository()),
272 272
 				$this->constraintParameterParser,
273 273
 				$this->statementGuidParser,
274 274
 				new LoggingHelper(
275 275
 					$this->dataFactory,
276
-					LoggerFactory::getInstance( 'WikibaseQualityConstraints' ),
276
+					LoggerFactory::getInstance('WikibaseQualityConstraints'),
277 277
 					$this->config
278 278
 				),
279
-				$this->config->get( 'WBQualityConstraintsCheckQualifiers' ),
280
-				$this->config->get( 'WBQualityConstraintsCheckReferences' ),
281
-				$this->config->get( 'WBQualityConstraintsPropertiesWithViolatingQualifiers' )
279
+				$this->config->get('WBQualityConstraintsCheckQualifiers'),
280
+				$this->config->get('WBQualityConstraintsCheckReferences'),
281
+				$this->config->get('WBQualityConstraintsPropertiesWithViolatingQualifiers')
282 282
 			);
283 283
 		}
284 284
 
@@ -289,10 +289,10 @@  discard block
 block discarded – undo
289 289
 	 * @return ConstraintChecker[]
290 290
 	 */
291 291
 	private function getConstraintCheckerMap() {
292
-		if ( $this->constraintCheckerMap === null ) {
292
+		if ($this->constraintCheckerMap === null) {
293 293
 			$connectionCheckerHelper = new ConnectionCheckerHelper();
294
-			$rangeCheckerHelper = new RangeCheckerHelper( $this->config, $this->unitConverter );
295
-			if ( $this->config->get( 'WBQualityConstraintsSparqlEndpoint' ) !== '' ) {
294
+			$rangeCheckerHelper = new RangeCheckerHelper($this->config, $this->unitConverter);
295
+			if ($this->config->get('WBQualityConstraintsSparqlEndpoint') !== '') {
296 296
 				$sparqlHelper = new SparqlHelper(
297 297
 					$this->config,
298 298
 					$this->rdfVocabulary,
@@ -314,118 +314,118 @@  discard block
 block discarded – undo
314 314
 			);
315 315
 
316 316
 			$this->constraintCheckerMap = [
317
-				$this->config->get( 'WBQualityConstraintsConflictsWithConstraintId' )
317
+				$this->config->get('WBQualityConstraintsConflictsWithConstraintId')
318 318
 					=> new ConflictsWithChecker(
319 319
 						$this->lookup,
320 320
 						$this->constraintParameterParser,
321 321
 						$connectionCheckerHelper
322 322
 					),
323
-				$this->config->get( 'WBQualityConstraintsItemRequiresClaimConstraintId' )
323
+				$this->config->get('WBQualityConstraintsItemRequiresClaimConstraintId')
324 324
 					=> new ItemChecker(
325 325
 						$this->lookup,
326 326
 						$this->constraintParameterParser,
327 327
 						$connectionCheckerHelper
328 328
 					),
329
-				$this->config->get( 'WBQualityConstraintsValueRequiresClaimConstraintId' )
329
+				$this->config->get('WBQualityConstraintsValueRequiresClaimConstraintId')
330 330
 					=> new TargetRequiredClaimChecker(
331 331
 						$this->lookup,
332 332
 						$this->constraintParameterParser,
333 333
 						$connectionCheckerHelper
334 334
 					),
335
-				$this->config->get( 'WBQualityConstraintsSymmetricConstraintId' )
335
+				$this->config->get('WBQualityConstraintsSymmetricConstraintId')
336 336
 					=> new SymmetricChecker(
337 337
 						$this->lookup,
338 338
 						$connectionCheckerHelper
339 339
 					),
340
-				$this->config->get( 'WBQualityConstraintsInverseConstraintId' )
340
+				$this->config->get('WBQualityConstraintsInverseConstraintId')
341 341
 					=> new InverseChecker(
342 342
 						$this->lookup,
343 343
 						$this->constraintParameterParser,
344 344
 						$connectionCheckerHelper
345 345
 					),
346
-				$this->config->get( 'WBQualityConstraintsUsedAsQualifierConstraintId' )
346
+				$this->config->get('WBQualityConstraintsUsedAsQualifierConstraintId')
347 347
 					=> new QualifierChecker(),
348
-				$this->config->get( 'WBQualityConstraintsAllowedQualifiersConstraintId' )
348
+				$this->config->get('WBQualityConstraintsAllowedQualifiersConstraintId')
349 349
 					=> new QualifiersChecker(
350 350
 						$this->constraintParameterParser
351 351
 					),
352
-				$this->config->get( 'WBQualityConstraintsMandatoryQualifierConstraintId' )
352
+				$this->config->get('WBQualityConstraintsMandatoryQualifierConstraintId')
353 353
 					=> new MandatoryQualifiersChecker(
354 354
 						$this->constraintParameterParser
355 355
 					),
356
-				$this->config->get( 'WBQualityConstraintsRangeConstraintId' )
356
+				$this->config->get('WBQualityConstraintsRangeConstraintId')
357 357
 					=> new RangeChecker(
358 358
 						$this->propertyDataTypeLookup,
359 359
 						$this->constraintParameterParser,
360 360
 						$rangeCheckerHelper
361 361
 					),
362
-				$this->config->get( 'WBQualityConstraintsDifferenceWithinRangeConstraintId' )
362
+				$this->config->get('WBQualityConstraintsDifferenceWithinRangeConstraintId')
363 363
 					=> new DiffWithinRangeChecker(
364 364
 						$this->constraintParameterParser,
365 365
 						$rangeCheckerHelper,
366 366
 						$this->config
367 367
 					),
368
-				$this->config->get( 'WBQualityConstraintsTypeConstraintId' )
368
+				$this->config->get('WBQualityConstraintsTypeConstraintId')
369 369
 					=> new TypeChecker(
370 370
 						$this->lookup,
371 371
 						$this->constraintParameterParser,
372 372
 						$typeCheckerHelper,
373 373
 						$this->config
374 374
 					),
375
-				$this->config->get( 'WBQualityConstraintsValueTypeConstraintId' )
375
+				$this->config->get('WBQualityConstraintsValueTypeConstraintId')
376 376
 					=> new ValueTypeChecker(
377 377
 						$this->lookup,
378 378
 						$this->constraintParameterParser,
379 379
 						$typeCheckerHelper,
380 380
 						$this->config
381 381
 					),
382
-				$this->config->get( 'WBQualityConstraintsSingleValueConstraintId' )
383
-					=> new SingleValueChecker( $this->constraintParameterParser ),
384
-				$this->config->get( 'WBQualityConstraintsMultiValueConstraintId' )
385
-					=> new MultiValueChecker( $this->constraintParameterParser ),
386
-				$this->config->get( 'WBQualityConstraintsDistinctValuesConstraintId' )
382
+				$this->config->get('WBQualityConstraintsSingleValueConstraintId')
383
+					=> new SingleValueChecker($this->constraintParameterParser),
384
+				$this->config->get('WBQualityConstraintsMultiValueConstraintId')
385
+					=> new MultiValueChecker($this->constraintParameterParser),
386
+				$this->config->get('WBQualityConstraintsDistinctValuesConstraintId')
387 387
 					=> new UniqueValueChecker(
388 388
 						$sparqlHelper
389 389
 					),
390
-				$this->config->get( 'WBQualityConstraintsFormatConstraintId' )
390
+				$this->config->get('WBQualityConstraintsFormatConstraintId')
391 391
 					=> new FormatChecker(
392 392
 						$this->constraintParameterParser,
393 393
 						$this->config,
394 394
 						$sparqlHelper
395 395
 					),
396
-				$this->config->get( 'WBQualityConstraintsCommonsLinkConstraintId' )
396
+				$this->config->get('WBQualityConstraintsCommonsLinkConstraintId')
397 397
 					=> new CommonsLinkChecker(
398 398
 						$this->constraintParameterParser,
399 399
 						$this->titleParser
400 400
 					),
401
-				$this->config->get( 'WBQualityConstraintsOneOfConstraintId' )
401
+				$this->config->get('WBQualityConstraintsOneOfConstraintId')
402 402
 					=> new OneOfChecker(
403 403
 						$this->constraintParameterParser
404 404
 					),
405
-				$this->config->get( 'WBQualityConstraintsUsedForValuesOnlyConstraintId' )
405
+				$this->config->get('WBQualityConstraintsUsedForValuesOnlyConstraintId')
406 406
 					=> new ValueOnlyChecker(),
407
-				$this->config->get( 'WBQualityConstraintsUsedAsReferenceConstraintId' )
407
+				$this->config->get('WBQualityConstraintsUsedAsReferenceConstraintId')
408 408
 					=> new ReferenceChecker(),
409
-				$this->config->get( 'WBQualityConstraintsNoBoundsConstraintId' )
409
+				$this->config->get('WBQualityConstraintsNoBoundsConstraintId')
410 410
 					=> new NoBoundsChecker(),
411
-				$this->config->get( 'WBQualityConstraintsAllowedUnitsConstraintId' )
411
+				$this->config->get('WBQualityConstraintsAllowedUnitsConstraintId')
412 412
 					=> new AllowedUnitsChecker(
413 413
 						$this->constraintParameterParser,
414 414
 						$this->unitConverter
415 415
 					),
416
-				$this->config->get( 'WBQualityConstraintsSingleBestValueConstraintId' )
417
-					=> new SingleBestValueChecker( $this->constraintParameterParser ),
418
-				$this->config->get( 'WBQualityConstraintsAllowedEntityTypesConstraintId' )
416
+				$this->config->get('WBQualityConstraintsSingleBestValueConstraintId')
417
+					=> new SingleBestValueChecker($this->constraintParameterParser),
418
+				$this->config->get('WBQualityConstraintsAllowedEntityTypesConstraintId')
419 419
 					=> new EntityTypeChecker(
420 420
 						$this->constraintParameterParser
421 421
 					),
422
-				$this->config->get( 'WBQualityConstraintsNoneOfConstraintId' )
422
+				$this->config->get('WBQualityConstraintsNoneOfConstraintId')
423 423
 					=> new NoneOfChecker(
424 424
 						$this->constraintParameterParser
425 425
 					),
426
-				$this->config->get( 'WBQualityConstraintsIntegerConstraintId' )
426
+				$this->config->get('WBQualityConstraintsIntegerConstraintId')
427 427
 					=> new IntegerChecker(),
428
-				$this->config->get( 'WBQualityConstraintsCitationNeededConstraintId' )
428
+				$this->config->get('WBQualityConstraintsCitationNeededConstraintId')
429 429
 					=> new CitationNeededChecker(),
430 430
 			];
431 431
 		}
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 	 * @return ConstraintRepository
438 438
 	 */
439 439
 	public function getConstraintRepository() {
440
-		if ( $this->constraintRepository === null ) {
440
+		if ($this->constraintRepository === null) {
441 441
 			$this->constraintRepository = new ConstraintRepository();
442 442
 		}
443 443
 
@@ -448,10 +448,10 @@  discard block
 block discarded – undo
448 448
 	 * @return LoggingHelper
449 449
 	 */
450 450
 	public function getLoggingHelper() {
451
-		if ( $this->loggingHelper === null ) {
451
+		if ($this->loggingHelper === null) {
452 452
 			$this->loggingHelper = new LoggingHelper(
453 453
 				$this->dataFactory,
454
-				LoggerFactory::getInstance( 'WikibaseQualityConstraints' ),
454
+				LoggerFactory::getInstance('WikibaseQualityConstraints'),
455 455
 				$this->config
456 456
 			);
457 457
 		}
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 	 * @return CheckResultSerializer
464 464
 	 */
465 465
 	public function getCheckResultSerializer() {
466
-		if ( $this->checkResultSerializer === null ) {
466
+		if ($this->checkResultSerializer === null) {
467 467
 			$this->checkResultSerializer = new CheckResultSerializer(
468 468
 				new ConstraintSerializer(
469 469
 					false // constraint parameters are not exposed
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 	 * @return CheckResultDeserializer
482 482
 	 */
483 483
 	public function getCheckResultDeserializer() {
484
-		if ( $this->checkResultDeserializer === null ) {
484
+		if ($this->checkResultDeserializer === null) {
485 485
 			$this->checkResultDeserializer = new CheckResultDeserializer(
486 486
 				new ConstraintDeserializer(),
487 487
 				new ContextCursorDeserializer(),
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 	 * @return WikiPageEntityMetaDataAccessor
501 501
 	 */
502 502
 	public function getWikiPageEntityMetaDataAccessor() {
503
-		if ( $this->wikiPageEntityMetaDataAccessor === null ) {
503
+		if ($this->wikiPageEntityMetaDataAccessor === null) {
504 504
 			$this->wikiPageEntityMetaDataAccessor = new WikiPageEntityMetaDataLookup(
505 505
 				$this->entityNamespaceLookup
506 506
 			);
@@ -513,12 +513,12 @@  discard block
 block discarded – undo
513 513
 	 * @return ResultsSource
514 514
 	 */
515 515
 	public function getResultsSource() {
516
-		if ( $this->resultsSource === null ) {
516
+		if ($this->resultsSource === null) {
517 517
 			$this->resultsSource = new CheckingResultsSource(
518 518
 				$this->getConstraintChecker()
519 519
 			);
520 520
 
521
-			if ( $this->config->get( 'WBQualityConstraintsCacheCheckConstraintsResults' ) ) {
521
+			if ($this->config->get('WBQualityConstraintsCacheCheckConstraintsResults')) {
522 522
 				$this->resultsSource = new CachingResultsSource(
523 523
 					$this->resultsSource,
524 524
 					ResultsCache::getDefaultInstance(),
@@ -526,9 +526,9 @@  discard block
 block discarded – undo
526 526
 					$this->getCheckResultDeserializer(),
527 527
 					$this->getWikiPageEntityMetaDataAccessor(),
528 528
 					$this->entityIdParser,
529
-					$this->config->get( 'WBQualityConstraintsCacheCheckConstraintsTTLSeconds' ),
529
+					$this->config->get('WBQualityConstraintsCacheCheckConstraintsTTLSeconds'),
530 530
 					$this->getPossiblyStaleConstraintTypes(),
531
-					$this->config->get( 'WBQualityConstraintsCacheCheckConstraintsMaximumRevisionIds' ),
531
+					$this->config->get('WBQualityConstraintsCacheCheckConstraintsMaximumRevisionIds'),
532 532
 					$this->getLoggingHelper()
533 533
 				);
534 534
 			}
@@ -542,10 +542,10 @@  discard block
 block discarded – undo
542 542
 	 */
543 543
 	public function getPossiblyStaleConstraintTypes() {
544 544
 		return [
545
-			$this->config->get( 'WBQualityConstraintsCommonsLinkConstraintId' ),
546
-			$this->config->get( 'WBQualityConstraintsTypeConstraintId' ),
547
-			$this->config->get( 'WBQualityConstraintsValueTypeConstraintId' ),
548
-			$this->config->get( 'WBQualityConstraintsDistinctValuesConstraintId' ),
545
+			$this->config->get('WBQualityConstraintsCommonsLinkConstraintId'),
546
+			$this->config->get('WBQualityConstraintsTypeConstraintId'),
547
+			$this->config->get('WBQualityConstraintsValueTypeConstraintId'),
548
+			$this->config->get('WBQualityConstraintsDistinctValuesConstraintId'),
549 549
 		];
550 550
 	}
551 551
 
Please login to merge, or discard this patch.
src/Api/CheckConstraints.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -79,21 +79,21 @@  discard block
 block discarded – undo
79 79
 	 *
80 80
 	 * @return self
81 81
 	 */
82
-	public static function newFromGlobalState( ApiMain $main, $name, $prefix = '' ) {
82
+	public static function newFromGlobalState(ApiMain $main, $name, $prefix = '') {
83 83
 		$repo = WikibaseRepo::getDefaultInstance();
84 84
 
85 85
 		$language = $repo->getUserLanguage();
86 86
 		$formatterOptions = new FormatterOptions();
87
-		$formatterOptions->setOption( SnakFormatter::OPT_LANG, $language->getCode() );
87
+		$formatterOptions->setOption(SnakFormatter::OPT_LANG, $language->getCode());
88 88
 		$valueFormatterFactory = $repo->getValueFormatterFactory();
89
-		$valueFormatter = $valueFormatterFactory->getValueFormatter( SnakFormatter::FORMAT_HTML, $formatterOptions );
89
+		$valueFormatter = $valueFormatterFactory->getValueFormatter(SnakFormatter::FORMAT_HTML, $formatterOptions);
90 90
 
91 91
 		$languageFallbackLabelDescriptionLookupFactory = $repo->getLanguageFallbackLabelDescriptionLookupFactory();
92
-		$labelDescriptionLookup = $languageFallbackLabelDescriptionLookupFactory->newLabelDescriptionLookup( $language );
92
+		$labelDescriptionLookup = $languageFallbackLabelDescriptionLookupFactory->newLabelDescriptionLookup($language);
93 93
 		$entityIdHtmlLinkFormatterFactory = $repo->getEntityIdHtmlLinkFormatterFactory();
94
-		$entityIdHtmlLinkFormatter = $entityIdHtmlLinkFormatterFactory->getEntityIdFormatter( $labelDescriptionLookup );
94
+		$entityIdHtmlLinkFormatter = $entityIdHtmlLinkFormatterFactory->getEntityIdFormatter($labelDescriptionLookup);
95 95
 		$entityIdLabelFormatterFactory = new EntityIdLabelFormatterFactory();
96
-		$entityIdLabelFormatter = $entityIdLabelFormatterFactory->getEntityIdFormatter( $labelDescriptionLookup );
96
+		$entityIdLabelFormatter = $entityIdLabelFormatterFactory->getEntityIdFormatter($labelDescriptionLookup);
97 97
 		$config = MediaWikiServices::getInstance()->getMainConfig();
98 98
 		$dataFactory = MediaWikiServices::getInstance()->getStatsdDataFactory();
99 99
 		$constraintReportFactory = ConstraintReportFactory::getDefaultInstance();
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 			$prefix,
118 118
 			$repo->getEntityIdParser(),
119 119
 			$repo->getStatementGuidValidator(),
120
-			$repo->getApiHelperFactory( RequestContext::getMain() ),
120
+			$repo->getApiHelperFactory(RequestContext::getMain()),
121 121
 			$resultsSource,
122 122
 			$checkResultsRenderer,
123 123
 			$dataFactory
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
 		CheckResultsRenderer $checkResultsRenderer,
147 147
 		IBufferingStatsdDataFactory $dataFactory
148 148
 	) {
149
-		parent::__construct( $main, $name, $prefix );
149
+		parent::__construct($main, $name, $prefix);
150 150
 		$this->entityIdParser = $entityIdParser;
151 151
 		$this->statementGuidValidator = $statementGuidValidator;
152
-		$this->resultBuilder = $apiHelperFactory->getResultBuilder( $this );
153
-		$this->errorReporter = $apiHelperFactory->getErrorReporter( $this );
152
+		$this->resultBuilder = $apiHelperFactory->getResultBuilder($this);
153
+		$this->errorReporter = $apiHelperFactory->getErrorReporter($this);
154 154
 		$this->resultsSource = $resultsSource;
155 155
 		$this->checkResultsRenderer = $checkResultsRenderer;
156 156
 		$this->dataFactory = $dataFactory;
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 
167 167
 		$params = $this->extractRequestParams();
168 168
 
169
-		$this->validateParameters( $params );
170
-		$entityIds = $this->parseEntityIds( $params );
171
-		$claimIds = $this->parseClaimIds( $params );
169
+		$this->validateParameters($params);
170
+		$entityIds = $this->parseEntityIds($params);
171
+		$claimIds = $this->parseClaimIds($params);
172 172
 		$constraintIDs = $params[self::PARAM_CONSTRAINT_ID];
173 173
 		$statuses = $params[self::PARAM_STATUS];
174 174
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 				)
185 185
 			)->getArray()
186 186
 		);
187
-		$this->resultBuilder->markSuccess( 1 );
187
+		$this->resultBuilder->markSuccess(1);
188 188
 	}
189 189
 
190 190
 	/**
@@ -192,24 +192,24 @@  discard block
 block discarded – undo
192 192
 	 *
193 193
 	 * @return EntityId[]
194 194
 	 */
195
-	private function parseEntityIds( array $params ) {
195
+	private function parseEntityIds(array $params) {
196 196
 		$ids = $params[self::PARAM_ID];
197 197
 
198
-		if ( $ids === null ) {
198
+		if ($ids === null) {
199 199
 			return [];
200
-		} elseif ( $ids === [] ) {
200
+		} elseif ($ids === []) {
201 201
 			$this->errorReporter->dieError(
202
-				'If ' . self::PARAM_ID . ' is specified, it must be nonempty.', 'no-data' );
202
+				'If '.self::PARAM_ID.' is specified, it must be nonempty.', 'no-data' );
203 203
 		}
204 204
 
205
-		return array_map( function ( $id ) {
205
+		return array_map(function($id) {
206 206
 			try {
207
-				return $this->entityIdParser->parse( $id );
208
-			} catch ( EntityIdParsingException $e ) {
207
+				return $this->entityIdParser->parse($id);
208
+			} catch (EntityIdParsingException $e) {
209 209
 				$this->errorReporter->dieError(
210
-					"Invalid id: $id", 'invalid-entity-id', 0, [ self::PARAM_ID => $id ] );
210
+					"Invalid id: $id", 'invalid-entity-id', 0, [self::PARAM_ID => $id] );
211 211
 			}
212
-		}, $ids );
212
+		}, $ids);
213 213
 	}
214 214
 
215 215
 	/**
@@ -217,35 +217,35 @@  discard block
 block discarded – undo
217 217
 	 *
218 218
 	 * @return string[]
219 219
 	 */
220
-	private function parseClaimIds( array $params ) {
220
+	private function parseClaimIds(array $params) {
221 221
 		$ids = $params[self::PARAM_CLAIM_ID];
222 222
 
223
-		if ( $ids === null ) {
223
+		if ($ids === null) {
224 224
 			return [];
225
-		} elseif ( $ids === [] ) {
225
+		} elseif ($ids === []) {
226 226
 			$this->errorReporter->dieError(
227
-				'If ' . self::PARAM_CLAIM_ID . ' is specified, it must be nonempty.', 'no-data' );
227
+				'If '.self::PARAM_CLAIM_ID.' is specified, it must be nonempty.', 'no-data' );
228 228
 		}
229 229
 
230
-		foreach ( $ids as $id ) {
231
-			if ( !$this->statementGuidValidator->validate( $id ) ) {
230
+		foreach ($ids as $id) {
231
+			if (!$this->statementGuidValidator->validate($id)) {
232 232
 				$this->errorReporter->dieError(
233
-					"Invalid claim id: $id", 'invalid-guid', 0, [ self::PARAM_CLAIM_ID => $id ] );
233
+					"Invalid claim id: $id", 'invalid-guid', 0, [self::PARAM_CLAIM_ID => $id] );
234 234
 			}
235 235
 		}
236 236
 
237 237
 		return $ids;
238 238
 	}
239 239
 
240
-	private function validateParameters( array $params ) {
241
-		if ( $params[self::PARAM_CONSTRAINT_ID] !== null
242
-			 && empty( $params[self::PARAM_CONSTRAINT_ID] )
240
+	private function validateParameters(array $params) {
241
+		if ($params[self::PARAM_CONSTRAINT_ID] !== null
242
+			 && empty($params[self::PARAM_CONSTRAINT_ID])
243 243
 		) {
244 244
 			$paramConstraintId = self::PARAM_CONSTRAINT_ID;
245 245
 			$this->errorReporter->dieError(
246 246
 				"If $paramConstraintId is specified, it must be nonempty.", 'no-data' );
247 247
 		}
248
-		if ( $params[self::PARAM_ID] === null && $params[self::PARAM_CLAIM_ID] === null ) {
248
+		if ($params[self::PARAM_ID] === null && $params[self::PARAM_CLAIM_ID] === null) {
249 249
 			$paramId = self::PARAM_ID;
250 250
 			$paramClaimId = self::PARAM_CLAIM_ID;
251 251
 			$this->errorReporter->dieError(
@@ -285,11 +285,11 @@  discard block
 block discarded – undo
285 285
 				],
286 286
 				ApiBase::PARAM_ISMULTI => true,
287 287
 				ApiBase::PARAM_ALL => true,
288
-				ApiBase::PARAM_DFLT => implode( '|', [
288
+				ApiBase::PARAM_DFLT => implode('|', [
289 289
 					CheckResult::STATUS_VIOLATION,
290 290
 					CheckResult::STATUS_WARNING,
291 291
 					CheckResult::STATUS_BAD_PARAMETERS,
292
-				] ),
292
+				]),
293 293
 				ApiBase::PARAM_HELP_MSG_PER_VALUE => [],
294 294
 			],
295 295
 		];
Please login to merge, or discard this patch.