@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @codeCoverageIgnore This method is purely declarative. |
78 | 78 | */ |
79 | 79 | public function getDefaultContextTypes() { |
80 | - return [ Context::TYPE_STATEMENT ]; |
|
80 | + return [Context::TYPE_STATEMENT]; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -89,20 +89,20 @@ discard block |
||
89 | 89 | * @return CheckResult |
90 | 90 | * @throws \ConfigException |
91 | 91 | */ |
92 | - public function checkConstraint( Context $context, Constraint $constraint ) { |
|
93 | - if ( $context->getSnakRank() === Statement::RANK_DEPRECATED ) { |
|
94 | - return new CheckResult( $context, $constraint, [], CheckResult::STATUS_DEPRECATED ); |
|
92 | + public function checkConstraint(Context $context, Constraint $constraint) { |
|
93 | + if ($context->getSnakRank() === Statement::RANK_DEPRECATED) { |
|
94 | + return new CheckResult($context, $constraint, [], CheckResult::STATUS_DEPRECATED); |
|
95 | 95 | } |
96 | 96 | $snak = $context->getSnak(); |
97 | - if ( !$snak instanceof PropertyValueSnak ) { |
|
97 | + if (!$snak instanceof PropertyValueSnak) { |
|
98 | 98 | // nothing to check |
99 | - return new CheckResult( $context, $constraint, [], CheckResult::STATUS_COMPLIANCE ); |
|
100 | - } elseif ( $snak->getDataValue()->getType() !== 'wikibase-entityid' ) { |
|
99 | + return new CheckResult($context, $constraint, [], CheckResult::STATUS_COMPLIANCE); |
|
100 | + } elseif ($snak->getDataValue()->getType() !== 'wikibase-entityid') { |
|
101 | 101 | // wrong data type |
102 | - $message = ( new ViolationMessage( 'wbqc-violation-message-value-needed-of-type' ) ) |
|
103 | - ->withEntityId( new ItemId( $constraint->getConstraintTypeItemId() ), Role::CONSTRAINT_TYPE_ITEM ) |
|
104 | - ->withDataValueType( 'wikibase-entityid' ); |
|
105 | - return new CheckResult( $context, $constraint, [], CheckResult::STATUS_VIOLATION, $message ); |
|
102 | + $message = (new ViolationMessage('wbqc-violation-message-value-needed-of-type')) |
|
103 | + ->withEntityId(new ItemId($constraint->getConstraintTypeItemId()), Role::CONSTRAINT_TYPE_ITEM) |
|
104 | + ->withDataValueType('wikibase-entityid'); |
|
105 | + return new CheckResult($context, $constraint, [], CheckResult::STATUS_VIOLATION, $message); |
|
106 | 106 | } |
107 | 107 | /** @var EntityId $subjectId */ |
108 | 108 | $subjectId = $context->getEntity()->getId(); |
@@ -111,11 +111,11 @@ discard block |
||
111 | 111 | /** @var Statement[] $subjectStatements */ |
112 | 112 | $subjectStatements = $context->getEntity()->getStatements()->toArray(); |
113 | 113 | /** @var Statement[] $objectStatements */ |
114 | - $objectStatements = $this->entityLookup->getEntity( $objectId )->getStatements()->toArray(); |
|
114 | + $objectStatements = $this->entityLookup->getEntity($objectId)->getStatements()->toArray(); |
|
115 | 115 | /** @var String[] $startPropertyIds */ |
116 | - $startPropertyIds = $this->config->get( self::CONFIG_VARIABLE_START_PROPERTY_IDS ); |
|
116 | + $startPropertyIds = $this->config->get(self::CONFIG_VARIABLE_START_PROPERTY_IDS); |
|
117 | 117 | /** @var String[] $endPropertyIds */ |
118 | - $endPropertyIds = $this->config->get( self::CONFIG_VARIABLE_END_PROPERTY_IDS ); |
|
118 | + $endPropertyIds = $this->config->get(self::CONFIG_VARIABLE_END_PROPERTY_IDS); |
|
119 | 119 | $subjectStartValue = $this->getExtremeValue( |
120 | 120 | $startPropertyIds, |
121 | 121 | $subjectStatements, |
@@ -137,15 +137,15 @@ discard block |
||
137 | 137 | 'end' |
138 | 138 | ); |
139 | 139 | if ( |
140 | - $this->rangeCheckerHelper->getComparison( $subjectStartValue, $subjectEndValue ) <= 0 && |
|
141 | - $this->rangeCheckerHelper->getComparison( $objectStartValue, $objectEndValue ) <= 0 && ( |
|
142 | - $this->rangeCheckerHelper->getComparison( $subjectEndValue, $objectStartValue ) < 0 || |
|
143 | - $this->rangeCheckerHelper->getComparison( $objectEndValue, $subjectStartValue ) < 0 |
|
140 | + $this->rangeCheckerHelper->getComparison($subjectStartValue, $subjectEndValue) <= 0 && |
|
141 | + $this->rangeCheckerHelper->getComparison($objectStartValue, $objectEndValue) <= 0 && ( |
|
142 | + $this->rangeCheckerHelper->getComparison($subjectEndValue, $objectStartValue) < 0 || |
|
143 | + $this->rangeCheckerHelper->getComparison($objectEndValue, $subjectStartValue) < 0 |
|
144 | 144 | ) |
145 | 145 | ) { |
146 | 146 | if ( |
147 | 147 | $subjectEndValue == null || |
148 | - $this->rangeCheckerHelper->getComparison( $objectEndValue, $subjectEndValue ) < 0 |
|
148 | + $this->rangeCheckerHelper->getComparison($objectEndValue, $subjectEndValue) < 0 |
|
149 | 149 | ) { |
150 | 150 | $earlierEntityId = $objectId; |
151 | 151 | $minEndValue = $objectEndValue; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $message = null; |
169 | 169 | $status = CheckResult::STATUS_COMPLIANCE; |
170 | 170 | } |
171 | - return new CheckResult( $context, $constraint, [], $status, $message ); |
|
171 | + return new CheckResult($context, $constraint, [], $status, $message); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -178,19 +178,19 @@ discard block |
||
178 | 178 | * |
179 | 179 | * @return DataValue|null |
180 | 180 | */ |
181 | - private function getExtremeValue( $extremePropertyIds, $statements, $startOrEnd ) { |
|
182 | - if ( $startOrEnd !== 'start' && $startOrEnd !== 'end' ) { |
|
183 | - throw new \InvalidArgumentException( '$startOrEnd must be \'start\' or \'end\'.' ); |
|
181 | + private function getExtremeValue($extremePropertyIds, $statements, $startOrEnd) { |
|
182 | + if ($startOrEnd !== 'start' && $startOrEnd !== 'end') { |
|
183 | + throw new \InvalidArgumentException('$startOrEnd must be \'start\' or \'end\'.'); |
|
184 | 184 | } |
185 | 185 | $extremeValue = null; |
186 | - foreach ( $extremePropertyIds as $extremePropertyId ) { |
|
187 | - $statementList = new StatementList( $statements ); |
|
188 | - $extremeStatements = $statementList->getByPropertyId( new PropertyId( $extremePropertyId ) ); |
|
186 | + foreach ($extremePropertyIds as $extremePropertyId) { |
|
187 | + $statementList = new StatementList($statements); |
|
188 | + $extremeStatements = $statementList->getByPropertyId(new PropertyId($extremePropertyId)); |
|
189 | 189 | /** @var Statement $extremeStatement */ |
190 | - foreach ( $extremeStatements as $extremeStatement ) { |
|
191 | - if ( $extremeStatement->getRank() !== Statement::RANK_DEPRECATED ) { |
|
190 | + foreach ($extremeStatements as $extremeStatement) { |
|
191 | + if ($extremeStatement->getRank() !== Statement::RANK_DEPRECATED) { |
|
192 | 192 | $snak = $extremeStatement->getMainSnak(); |
193 | - if ( !$snak instanceof PropertyValueSnak ) { |
|
193 | + if (!$snak instanceof PropertyValueSnak) { |
|
194 | 194 | return null; |
195 | 195 | } else { |
196 | 196 | $comparison = $this->rangeCheckerHelper->getComparison( |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | ); |
200 | 200 | if ( |
201 | 201 | $extremeValue === null || |
202 | - ( $startOrEnd === 'start' && $comparison < 0 ) || |
|
203 | - ( $startOrEnd === 'end' && $comparison > 0 ) |
|
202 | + ($startOrEnd === 'start' && $comparison < 0) || |
|
203 | + ($startOrEnd === 'end' && $comparison > 0) |
|
204 | 204 | ) { |
205 | 205 | $extremeValue = $snak->getDataValue(); |
206 | 206 | } |
@@ -230,17 +230,16 @@ discard block |
||
230 | 230 | DataValue $maxStartValue |
231 | 231 | ) { |
232 | 232 | $messageKey = $earlierEntityId === $subjectId ? |
233 | - 'wbqc-violation-message-contemporary-subject-earlier' : |
|
234 | - 'wbqc-violation-message-contemporary-value-earlier'; |
|
235 | - return ( new ViolationMessage( $messageKey ) ) |
|
236 | - ->withEntityId( $subjectId, Role::SUBJECT ) |
|
237 | - ->withEntityId( $propertyId, Role::PREDICATE ) |
|
238 | - ->withEntityId( $objectId, Role::OBJECT ) |
|
239 | - ->withDataValue( $minEndValue, Role::OBJECT ) |
|
240 | - ->withDataValue( $maxStartValue, Role::OBJECT ); |
|
233 | + 'wbqc-violation-message-contemporary-subject-earlier' : 'wbqc-violation-message-contemporary-value-earlier'; |
|
234 | + return (new ViolationMessage($messageKey)) |
|
235 | + ->withEntityId($subjectId, Role::SUBJECT) |
|
236 | + ->withEntityId($propertyId, Role::PREDICATE) |
|
237 | + ->withEntityId($objectId, Role::OBJECT) |
|
238 | + ->withDataValue($minEndValue, Role::OBJECT) |
|
239 | + ->withDataValue($maxStartValue, Role::OBJECT); |
|
241 | 240 | } |
242 | 241 | |
243 | - public function checkConstraintParameters( Constraint $constraint ) { |
|
242 | + public function checkConstraintParameters(Constraint $constraint) { |
|
244 | 243 | // no parameters |
245 | 244 | return []; |
246 | 245 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | public static function getDefaultInstance() { |
138 | 138 | static $instance = null; |
139 | 139 | |
140 | - if ( $instance === null ) { |
|
140 | + if ($instance === null) { |
|
141 | 141 | $wikibaseRepo = WikibaseRepo::getDefaultInstance(); |
142 | 142 | $config = MediaWikiServices::getInstance()->getMainConfig(); |
143 | 143 | $titleParser = MediaWikiServices::getInstance()->getTitleParser(); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * @return DelegatingConstraintChecker |
184 | 184 | */ |
185 | 185 | public function getConstraintChecker() { |
186 | - if ( $this->delegatingConstraintChecker === null ) { |
|
186 | + if ($this->delegatingConstraintChecker === null) { |
|
187 | 187 | $this->delegatingConstraintChecker = new DelegatingConstraintChecker( |
188 | 188 | $this->lookup, |
189 | 189 | $this->getConstraintCheckerMap(), |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | ConstraintsServices::getConstraintParameterParser(), |
192 | 192 | $this->statementGuidParser, |
193 | 193 | ConstraintsServices::getLoggingHelper(), |
194 | - $this->config->get( 'WBQualityConstraintsCheckQualifiers' ), |
|
195 | - $this->config->get( 'WBQualityConstraintsCheckReferences' ), |
|
196 | - $this->config->get( 'WBQualityConstraintsPropertiesWithViolatingQualifiers' ) |
|
194 | + $this->config->get('WBQualityConstraintsCheckQualifiers'), |
|
195 | + $this->config->get('WBQualityConstraintsCheckReferences'), |
|
196 | + $this->config->get('WBQualityConstraintsPropertiesWithViolatingQualifiers') |
|
197 | 197 | ); |
198 | 198 | } |
199 | 199 | |
@@ -204,126 +204,126 @@ discard block |
||
204 | 204 | * @return ConstraintChecker[] |
205 | 205 | */ |
206 | 206 | private function getConstraintCheckerMap() { |
207 | - if ( $this->constraintCheckerMap === null ) { |
|
207 | + if ($this->constraintCheckerMap === null) { |
|
208 | 208 | $this->constraintCheckerMap = [ |
209 | - $this->config->get( 'WBQualityConstraintsConflictsWithConstraintId' ) |
|
209 | + $this->config->get('WBQualityConstraintsConflictsWithConstraintId') |
|
210 | 210 | => new ConflictsWithChecker( |
211 | 211 | $this->lookup, |
212 | 212 | ConstraintsServices::getConstraintParameterParser(), |
213 | 213 | ConstraintsServices::getConnectionCheckerHelper() |
214 | 214 | ), |
215 | - $this->config->get( 'WBQualityConstraintsItemRequiresClaimConstraintId' ) |
|
215 | + $this->config->get('WBQualityConstraintsItemRequiresClaimConstraintId') |
|
216 | 216 | => new ItemChecker( |
217 | 217 | $this->lookup, |
218 | 218 | ConstraintsServices::getConstraintParameterParser(), |
219 | 219 | ConstraintsServices::getConnectionCheckerHelper() |
220 | 220 | ), |
221 | - $this->config->get( 'WBQualityConstraintsValueRequiresClaimConstraintId' ) |
|
221 | + $this->config->get('WBQualityConstraintsValueRequiresClaimConstraintId') |
|
222 | 222 | => new TargetRequiredClaimChecker( |
223 | 223 | $this->lookup, |
224 | 224 | ConstraintsServices::getConstraintParameterParser(), |
225 | 225 | ConstraintsServices::getConnectionCheckerHelper() |
226 | 226 | ), |
227 | - $this->config->get( 'WBQualityConstraintsSymmetricConstraintId' ) |
|
227 | + $this->config->get('WBQualityConstraintsSymmetricConstraintId') |
|
228 | 228 | => new SymmetricChecker( |
229 | 229 | $this->lookup, |
230 | 230 | ConstraintsServices::getConnectionCheckerHelper() |
231 | 231 | ), |
232 | - $this->config->get( 'WBQualityConstraintsInverseConstraintId' ) |
|
232 | + $this->config->get('WBQualityConstraintsInverseConstraintId') |
|
233 | 233 | => new InverseChecker( |
234 | 234 | $this->lookup, |
235 | 235 | ConstraintsServices::getConstraintParameterParser(), |
236 | 236 | ConstraintsServices::getConnectionCheckerHelper() |
237 | 237 | ), |
238 | - $this->config->get( 'WBQualityConstraintsUsedAsQualifierConstraintId' ) |
|
238 | + $this->config->get('WBQualityConstraintsUsedAsQualifierConstraintId') |
|
239 | 239 | => new QualifierChecker(), |
240 | - $this->config->get( 'WBQualityConstraintsAllowedQualifiersConstraintId' ) |
|
240 | + $this->config->get('WBQualityConstraintsAllowedQualifiersConstraintId') |
|
241 | 241 | => new QualifiersChecker( |
242 | 242 | ConstraintsServices::getConstraintParameterParser() |
243 | 243 | ), |
244 | - $this->config->get( 'WBQualityConstraintsMandatoryQualifierConstraintId' ) |
|
244 | + $this->config->get('WBQualityConstraintsMandatoryQualifierConstraintId') |
|
245 | 245 | => new MandatoryQualifiersChecker( |
246 | 246 | ConstraintsServices::getConstraintParameterParser() |
247 | 247 | ), |
248 | - $this->config->get( 'WBQualityConstraintsRangeConstraintId' ) |
|
248 | + $this->config->get('WBQualityConstraintsRangeConstraintId') |
|
249 | 249 | => new RangeChecker( |
250 | 250 | $this->propertyDataTypeLookup, |
251 | 251 | ConstraintsServices::getConstraintParameterParser(), |
252 | 252 | ConstraintsServices::getRangeCheckerHelper() |
253 | 253 | ), |
254 | - $this->config->get( 'WBQualityConstraintsDifferenceWithinRangeConstraintId' ) |
|
254 | + $this->config->get('WBQualityConstraintsDifferenceWithinRangeConstraintId') |
|
255 | 255 | => new DiffWithinRangeChecker( |
256 | 256 | ConstraintsServices::getConstraintParameterParser(), |
257 | 257 | ConstraintsServices::getRangeCheckerHelper(), |
258 | 258 | $this->config |
259 | 259 | ), |
260 | - $this->config->get( 'WBQualityConstraintsTypeConstraintId' ) |
|
260 | + $this->config->get('WBQualityConstraintsTypeConstraintId') |
|
261 | 261 | => new TypeChecker( |
262 | 262 | $this->lookup, |
263 | 263 | ConstraintsServices::getConstraintParameterParser(), |
264 | 264 | ConstraintsServices::getTypeCheckerHelper(), |
265 | 265 | $this->config |
266 | 266 | ), |
267 | - $this->config->get( 'WBQualityConstraintsValueTypeConstraintId' ) |
|
267 | + $this->config->get('WBQualityConstraintsValueTypeConstraintId') |
|
268 | 268 | => new ValueTypeChecker( |
269 | 269 | $this->lookup, |
270 | 270 | ConstraintsServices::getConstraintParameterParser(), |
271 | 271 | ConstraintsServices::getTypeCheckerHelper(), |
272 | 272 | $this->config |
273 | 273 | ), |
274 | - $this->config->get( 'WBQualityConstraintsSingleValueConstraintId' ) |
|
275 | - => new SingleValueChecker( ConstraintsServices::getConstraintParameterParser() ), |
|
276 | - $this->config->get( 'WBQualityConstraintsMultiValueConstraintId' ) |
|
277 | - => new MultiValueChecker( ConstraintsServices::getConstraintParameterParser() ), |
|
278 | - $this->config->get( 'WBQualityConstraintsDistinctValuesConstraintId' ) |
|
274 | + $this->config->get('WBQualityConstraintsSingleValueConstraintId') |
|
275 | + => new SingleValueChecker(ConstraintsServices::getConstraintParameterParser()), |
|
276 | + $this->config->get('WBQualityConstraintsMultiValueConstraintId') |
|
277 | + => new MultiValueChecker(ConstraintsServices::getConstraintParameterParser()), |
|
278 | + $this->config->get('WBQualityConstraintsDistinctValuesConstraintId') |
|
279 | 279 | => new UniqueValueChecker( |
280 | 280 | ConstraintsServices::getSparqlHelper() |
281 | 281 | ), |
282 | - $this->config->get( 'WBQualityConstraintsFormatConstraintId' ) |
|
282 | + $this->config->get('WBQualityConstraintsFormatConstraintId') |
|
283 | 283 | => new FormatChecker( |
284 | 284 | ConstraintsServices::getConstraintParameterParser(), |
285 | 285 | $this->config, |
286 | 286 | ConstraintsServices::getSparqlHelper() |
287 | 287 | ), |
288 | - $this->config->get( 'WBQualityConstraintsCommonsLinkConstraintId' ) |
|
288 | + $this->config->get('WBQualityConstraintsCommonsLinkConstraintId') |
|
289 | 289 | => new CommonsLinkChecker( |
290 | 290 | ConstraintsServices::getConstraintParameterParser(), |
291 | 291 | $this->titleParser |
292 | 292 | ), |
293 | - $this->config->get( 'WBQualityConstraintsOneOfConstraintId' ) |
|
293 | + $this->config->get('WBQualityConstraintsOneOfConstraintId') |
|
294 | 294 | => new OneOfChecker( |
295 | 295 | ConstraintsServices::getConstraintParameterParser() |
296 | 296 | ), |
297 | - $this->config->get( 'WBQualityConstraintsUsedForValuesOnlyConstraintId' ) |
|
297 | + $this->config->get('WBQualityConstraintsUsedForValuesOnlyConstraintId') |
|
298 | 298 | => new ValueOnlyChecker(), |
299 | - $this->config->get( 'WBQualityConstraintsUsedAsReferenceConstraintId' ) |
|
299 | + $this->config->get('WBQualityConstraintsUsedAsReferenceConstraintId') |
|
300 | 300 | => new ReferenceChecker(), |
301 | - $this->config->get( 'WBQualityConstraintsNoBoundsConstraintId' ) |
|
301 | + $this->config->get('WBQualityConstraintsNoBoundsConstraintId') |
|
302 | 302 | => new NoBoundsChecker(), |
303 | - $this->config->get( 'WBQualityConstraintsAllowedUnitsConstraintId' ) |
|
303 | + $this->config->get('WBQualityConstraintsAllowedUnitsConstraintId') |
|
304 | 304 | => new AllowedUnitsChecker( |
305 | 305 | ConstraintsServices::getConstraintParameterParser(), |
306 | 306 | $this->unitConverter |
307 | 307 | ), |
308 | - $this->config->get( 'WBQualityConstraintsSingleBestValueConstraintId' ) |
|
309 | - => new SingleBestValueChecker( ConstraintsServices::getConstraintParameterParser() ), |
|
310 | - $this->config->get( 'WBQualityConstraintsAllowedEntityTypesConstraintId' ) |
|
308 | + $this->config->get('WBQualityConstraintsSingleBestValueConstraintId') |
|
309 | + => new SingleBestValueChecker(ConstraintsServices::getConstraintParameterParser()), |
|
310 | + $this->config->get('WBQualityConstraintsAllowedEntityTypesConstraintId') |
|
311 | 311 | => new EntityTypeChecker( |
312 | 312 | ConstraintsServices::getConstraintParameterParser() |
313 | 313 | ), |
314 | - $this->config->get( 'WBQualityConstraintsNoneOfConstraintId' ) |
|
314 | + $this->config->get('WBQualityConstraintsNoneOfConstraintId') |
|
315 | 315 | => new NoneOfChecker( |
316 | 316 | ConstraintsServices::getConstraintParameterParser() |
317 | 317 | ), |
318 | - $this->config->get( 'WBQualityConstraintsIntegerConstraintId' ) |
|
318 | + $this->config->get('WBQualityConstraintsIntegerConstraintId') |
|
319 | 319 | => new IntegerChecker(), |
320 | - $this->config->get( 'WBQualityConstraintsCitationNeededConstraintId' ) |
|
320 | + $this->config->get('WBQualityConstraintsCitationNeededConstraintId') |
|
321 | 321 | => new CitationNeededChecker(), |
322 | - $this->config->get( 'WBQualityConstraintsPropertyScopeConstraintId' ) |
|
322 | + $this->config->get('WBQualityConstraintsPropertyScopeConstraintId') |
|
323 | 323 | => new PropertyScopeChecker( |
324 | 324 | ConstraintsServices::getConstraintParameterParser() |
325 | 325 | ), |
326 | - $this->config->get( 'WBQualityConstraintsContemporaryConstraintId' ) |
|
326 | + $this->config->get('WBQualityConstraintsContemporaryConstraintId') |
|
327 | 327 | => new ContemporaryChecker( |
328 | 328 | $this->lookup, |
329 | 329 | ConstraintsServices::getRangeCheckerHelper(), |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | * @return WikiPageEntityMetaDataAccessor |
340 | 340 | */ |
341 | 341 | public function getWikiPageEntityMetaDataAccessor() { |
342 | - if ( $this->wikiPageEntityMetaDataAccessor === null ) { |
|
342 | + if ($this->wikiPageEntityMetaDataAccessor === null) { |
|
343 | 343 | $this->wikiPageEntityMetaDataAccessor = new WikiPageEntityMetaDataLookup( |
344 | 344 | $this->entityNamespaceLookup |
345 | 345 | ); |
@@ -352,12 +352,12 @@ discard block |
||
352 | 352 | * @return ResultsSource |
353 | 353 | */ |
354 | 354 | public function getResultsSource() { |
355 | - if ( $this->resultsSource === null ) { |
|
355 | + if ($this->resultsSource === null) { |
|
356 | 356 | $this->resultsSource = new CheckingResultsSource( |
357 | 357 | $this->getConstraintChecker() |
358 | 358 | ); |
359 | 359 | |
360 | - if ( $this->config->get( 'WBQualityConstraintsCacheCheckConstraintsResults' ) ) { |
|
360 | + if ($this->config->get('WBQualityConstraintsCacheCheckConstraintsResults')) { |
|
361 | 361 | $this->resultsSource = new CachingResultsSource( |
362 | 362 | $this->resultsSource, |
363 | 363 | ResultsCache::getDefaultInstance(), |
@@ -365,9 +365,9 @@ discard block |
||
365 | 365 | ConstraintsServices::getCheckResultDeserializer(), |
366 | 366 | $this->getWikiPageEntityMetaDataAccessor(), |
367 | 367 | $this->entityIdParser, |
368 | - $this->config->get( 'WBQualityConstraintsCacheCheckConstraintsTTLSeconds' ), |
|
368 | + $this->config->get('WBQualityConstraintsCacheCheckConstraintsTTLSeconds'), |
|
369 | 369 | $this->getPossiblyStaleConstraintTypes(), |
370 | - $this->config->get( 'WBQualityConstraintsCacheCheckConstraintsMaximumRevisionIds' ), |
|
370 | + $this->config->get('WBQualityConstraintsCacheCheckConstraintsMaximumRevisionIds'), |
|
371 | 371 | ConstraintsServices::getLoggingHelper() |
372 | 372 | ); |
373 | 373 | } |
@@ -381,10 +381,10 @@ discard block |
||
381 | 381 | */ |
382 | 382 | public function getPossiblyStaleConstraintTypes() { |
383 | 383 | return [ |
384 | - $this->config->get( 'WBQualityConstraintsCommonsLinkConstraintId' ), |
|
385 | - $this->config->get( 'WBQualityConstraintsTypeConstraintId' ), |
|
386 | - $this->config->get( 'WBQualityConstraintsValueTypeConstraintId' ), |
|
387 | - $this->config->get( 'WBQualityConstraintsDistinctValuesConstraintId' ), |
|
384 | + $this->config->get('WBQualityConstraintsCommonsLinkConstraintId'), |
|
385 | + $this->config->get('WBQualityConstraintsTypeConstraintId'), |
|
386 | + $this->config->get('WBQualityConstraintsValueTypeConstraintId'), |
|
387 | + $this->config->get('WBQualityConstraintsDistinctValuesConstraintId'), |
|
388 | 388 | ]; |
389 | 389 | } |
390 | 390 |