Code Duplication    Length = 11-11 lines in 2 locations

src/ConstraintCheck/Helper/ConstraintParameterParser.php 2 locations

@@ 831-841 (lines=11) @@
828
			case $this->config->get( 'WBQualityConstraintsWikibaseLexemeId' ):
829
				$entityType = 'lexeme';
830
				break;
831
			default:
832
				$allowed = [
833
					new ItemId( $this->config->get( 'WBQualityConstraintsWikibaseItemId' ) ),
834
					new ItemId( $this->config->get( 'WBQualityConstraintsWikibasePropertyId' ) ),
835
					new ItemId( $this->config->get( 'WBQualityConstraintsWikibaseLexemeId' ) ),
836
				];
837
				throw new ConstraintParameterException(
838
					( new ViolationMessage( 'wbqc-violation-message-parameter-oneof' ) )
839
						->withEntityId( new PropertyId( $parameterId ), Role::CONSTRAINT_PARAMETER_PROPERTY )
840
						->withEntityIdList( $allowed, Role::CONSTRAINT_PARAMETER_VALUE )
841
				);
842
		}
843
844
		return new EntityTypesParameter( [ $entityType ], [ $itemId ] );
@@ 922-932 (lines=11) @@
919
				return Context::TYPE_QUALIFIER;
920
			case $this->config->get( 'WBQualityConstraintsAsReferencesId' ):
921
				return Context::TYPE_REFERENCE;
922
			default:
923
				$allowed = [
924
					new ItemId( $this->config->get( 'WBQualityConstraintsAsMainValueId' ) ),
925
					new ItemId( $this->config->get( 'WBQualityConstraintsAsQualifiersId' ) ),
926
					new ItemId( $this->config->get( 'WBQualityConstraintsAsReferencesId' ) ),
927
				];
928
				throw new ConstraintParameterException(
929
					( new ViolationMessage( 'wbqc-violation-message-parameter-oneof' ) )
930
						->withEntityId( new PropertyId( $parameterId ), Role::CONSTRAINT_PARAMETER_PROPERTY )
931
						->withEntityIdList( $allowed, Role::CONSTRAINT_PARAMETER_VALUE )
932
				);
933
		}
934
	}
935