Code Duplication    Length = 4-7 lines in 2 locations

src/Intraface/modules/shop/Coordinator.php 1 location

@@ 155-158 (lines=4) @@
152
        }
153
154
        // opdaterer kontakten
155
        if (!$contact_id = $this->contact->save($input)) {
156
            $this->error->merge($this->contact->getError()->getMessage());
157
            return false;
158
        }
159
160
        // we update/add the contactperson.
161
        if (isset($input['type']) && $input['type'] == 'corporation') { // firma

src/Intraface/modules/webshop/Webshop.php 1 location

@@ 152-158 (lines=7) @@
149
        }
150
151
152
        if (!isset($input['contact_id'])) {
153
            // opdaterer kontakten
154
            if (!$contact_id = $this->contact->save($input)) {
155
                $this->error->merge($this->contact->getError()->getMessage());
156
                return false;
157
            }
158
        }
159
160
        // we update/add the contactperson.
161
        if (isset($input['type']) && $input['type'] == 'corporation') { // firma