@@ 283-292 (lines=10) @@ | ||
280 | $constraints = $this->constraintLookup->queryConstraintsForProperty( $propertyId ); |
|
281 | $result = []; |
|
282 | ||
283 | foreach ( $constraints as $constraint ) { |
|
284 | $problems = $this->checkCommonConstraintParameters( $constraint ); |
|
285 | ||
286 | if ( array_key_exists( $constraint->getConstraintTypeItemId(), $this->checkerMap ) ) { |
|
287 | $checker = $this->checkerMap[$constraint->getConstraintTypeItemId()]; |
|
288 | $problems = array_merge( $problems, $checker->checkConstraintParameters( $constraint ) ); |
|
289 | } |
|
290 | ||
291 | $result[$constraint->getConstraintId()] = $problems; |
|
292 | } |
|
293 | ||
294 | return $result; |
|
295 | } |
|
@@ 309-320 (lines=12) @@ | ||
306 | $propertyId = $this->statementGuidParser->parse( $constraintId )->getEntityId(); |
|
307 | $constraints = $this->constraintLookup->queryConstraintsForProperty( $propertyId ); |
|
308 | ||
309 | foreach ( $constraints as $constraint ) { |
|
310 | if ( $constraint->getConstraintId() === $constraintId ) { |
|
311 | $problems = $this->checkCommonConstraintParameters( $constraint ); |
|
312 | ||
313 | if ( array_key_exists( $constraint->getConstraintTypeItemId(), $this->checkerMap ) ) { |
|
314 | $checker = $this->checkerMap[$constraint->getConstraintTypeItemId()]; |
|
315 | $problems = array_merge( $problems, $checker->checkConstraintParameters( $constraint ) ); |
|
316 | } |
|
317 | ||
318 | return $problems; |
|
319 | } |
|
320 | } |
|
321 | ||
322 | return null; |
|
323 | } |