Code Duplication    Length = 8-8 lines in 2 locations

lib/Doctrine/ORM/Mapping/ClassMetadata.php 2 locations

@@ 2906-2913 (lines=8) @@
2903
     *
2904
     * @throws MappingException
2905
     */
2906
    public function getSingleAssociationJoinColumnName($fieldName)
2907
    {
2908
        if ( ! $this->isAssociationWithSingleJoinColumn($fieldName)) {
2909
            throw MappingException::noSingleAssociationJoinColumnFound($this->name, $fieldName);
2910
        }
2911
2912
        return $this->associationMappings[$fieldName]['joinColumns'][0]['name'];
2913
    }
2914
2915
    /**
2916
     * Returns the single association referenced join column name (if any).
@@ 2924-2931 (lines=8) @@
2921
     *
2922
     * @throws MappingException
2923
     */
2924
    public function getSingleAssociationReferencedJoinColumnName($fieldName)
2925
    {
2926
        if ( ! $this->isAssociationWithSingleJoinColumn($fieldName)) {
2927
            throw MappingException::noSingleAssociationJoinColumnFound($this->name, $fieldName);
2928
        }
2929
2930
        return $this->associationMappings[$fieldName]['joinColumns'][0]['referencedColumnName'];
2931
    }
2932
2933
    /**
2934
     * Used to retrieve a fieldname for either field or association from a given column.