Code Duplication    Length = 5-5 lines in 2 locations

src/api/dbobject.php 2 locations

@@ 83-87 (lines=5) @@
80
    {
81
        $this->initialize();
82
83
        if (   !$this->cm->hasField($field)
84
            && array_key_exists($field, $this->cm->midgard['field_aliases']))
85
        {
86
            $field = $this->cm->midgard['field_aliases'][$field];
87
        }
88
        if ($this->cm->isSingleValuedAssociation($field))
89
        {
90
            // mgd api only allows setting links identifiers, doctrine wants objects,
@@ 149-153 (lines=5) @@
146
    {
147
        $this->initialize();
148
149
        if (   !$this->cm->hasField($field)
150
            && array_key_exists($field, $this->cm->midgard['field_aliases']))
151
        {
152
            $field = $this->cm->midgard['field_aliases'][$field];
153
        }
154
155
        if ($this->cm->isSingleValuedAssociation($field))
156
        {