Code Duplication    Length = 5-5 lines in 2 locations

Mapping/EntityMetadata.php 2 locations

@@ 689-693 (lines=5) @@
686
687
        // Complete id mapping
688
        if (isset($mapping['id']) && $mapping['id'] === true) {
689
            if (isset($mapping['orphanRemoval']) && $mapping['orphanRemoval'] == true) {
690
                throw new MappingException(
691
                    sprintf('Illegal orphanRemoval on identifier association %s for %s', $mapping['field'], $this->name)
692
                );
693
            }
694
695
            if (!in_array($mapping['field'], $this->identifier, true)) {
696
                $this->identifier[]              = $mapping['field'];
@@ 711-715 (lines=5) @@
708
            $mapping['isOwningSide'] = false;
709
        }
710
711
        if (isset($mapping['id']) && $mapping['id'] === true && $mapping['type'] & self::TO_MANY) {
712
            throw new MappingException(
713
                sprintf('Illegal toMany identifier association %s for %s', $mapping['field'], $this->name)
714
            );
715
        }
716
717
        // Fetch mode. Default fetch mode to LAZY, if not set.
718
        if (!isset($mapping['fetch'])) {