Code Duplication    Length = 10-12 lines in 2 locations

src/ConstraintCheck/DelegatingConstraintChecker.php 2 locations

@@ 270-279 (lines=10) @@
267
		$constraints = $this->constraintLookup->queryConstraintsForProperty( $propertyId );
268
		$result = [];
269
270
		foreach ( $constraints as $constraint ) {
271
			$problems = $this->checkCommonConstraintParameters( $constraint );
272
273
			if ( array_key_exists( $constraint->getConstraintTypeItemId(), $this->checkerMap ) ) {
274
				$checker = $this->checkerMap[$constraint->getConstraintTypeItemId()];
275
				$problems = array_merge( $problems, $checker->checkConstraintParameters( $constraint ) );
276
			}
277
278
			$result[$constraint->getConstraintId()] = $problems;
279
		}
280
281
		return $result;
282
	}
@@ 296-307 (lines=12) @@
293
		$propertyId = $this->statementGuidParser->parse( $constraintId )->getEntityId();
294
		$constraints = $this->constraintLookup->queryConstraintsForProperty( $propertyId );
295
296
		foreach ( $constraints as $constraint ) {
297
			if ( $constraint->getConstraintId() === $constraintId ) {
298
				$problems = $this->checkCommonConstraintParameters( $constraint );
299
300
				if ( array_key_exists( $constraint->getConstraintTypeItemId(), $this->checkerMap ) ) {
301
					$checker = $this->checkerMap[$constraint->getConstraintTypeItemId()];
302
					$problems = array_merge( $problems, $checker->checkConstraintParameters( $constraint ) );
303
				}
304
305
				return $problems;
306
			}
307
		}
308
309
		return null;
310
	}