Code Duplication    Length = 3-3 lines in 4 locations

lib/Doctrine/ODM/MongoDB/Tools/DocumentGenerator.php 4 locations

@@ 680-682 (lines=3) @@
677
                }
678
            } elseif ($fieldMapping['type'] === ClassMetadataInfo::ONE) {
679
                $nullable = $this->isAssociationNullable($fieldMapping) ? 'null' : null;
680
                if ($code = $this->generateDocumentStubMethod($metadata, 'set', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null, $nullable)) {
681
                    $methods[] = $code;
682
                }
683
                if ($code = $this->generateDocumentStubMethod($metadata, 'get', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null)) {
684
                    $methods[] = $code;
685
                }
@@ 683-685 (lines=3) @@
680
                if ($code = $this->generateDocumentStubMethod($metadata, 'set', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null, $nullable)) {
681
                    $methods[] = $code;
682
                }
683
                if ($code = $this->generateDocumentStubMethod($metadata, 'get', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null)) {
684
                    $methods[] = $code;
685
                }
686
            } elseif ($fieldMapping['type'] === ClassMetadataInfo::MANY) {
687
                if ($code = $this->generateDocumentStubMethod($metadata, 'add', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null)) {
688
                    $methods[] = $code;
@@ 687-689 (lines=3) @@
684
                    $methods[] = $code;
685
                }
686
            } elseif ($fieldMapping['type'] === ClassMetadataInfo::MANY) {
687
                if ($code = $this->generateDocumentStubMethod($metadata, 'add', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null)) {
688
                    $methods[] = $code;
689
                }
690
                if ($code = $this->generateDocumentStubMethod($metadata, 'remove', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null)) {
691
                    $methods[] = $code;
692
                }
@@ 690-692 (lines=3) @@
687
                if ($code = $this->generateDocumentStubMethod($metadata, 'add', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null)) {
688
                    $methods[] = $code;
689
                }
690
                if ($code = $this->generateDocumentStubMethod($metadata, 'remove', $fieldMapping['fieldName'], isset($fieldMapping['targetDocument']) ? $fieldMapping['targetDocument'] : null)) {
691
                    $methods[] = $code;
692
                }
693
                if ($code = $this->generateDocumentStubMethod($metadata, 'get', $fieldMapping['fieldName'], '\Doctrine\Common\Collections\Collection')) {
694
                    $methods[] = $code;
695
                }