Code Duplication    Length = 20-21 lines in 2 locations

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

@@ 233-253 (lines=21) @@
230
     *
231
     * @return integer Order id
232
     */
233
    public function placeManualOrder($input = array(), $products = array())
234
    {
235
        $order_id = $this->createOrder($input);
236
237
        if ($order_id == 0) {
238
            $this->error->set('unable to create the order');
239
            return false;
240
        }
241
242
        if (!$this->addOrderLines($products)) {
243
            $this->error->set('unable add products to the order');
244
            return false;
245
        }
246
247
        if (!$this->sendEmail($order_id)) {
248
            $this->error->set('unable to send email to the customer');
249
            return false;
250
        }
251
252
        return $order_id;
253
    }
254
255
    /**
256
     * Places the order and utilizes basket

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

@@ 219-238 (lines=20) @@
216
     *
217
     * @return integer Order id
218
     */
219
    public function placeManualOrder($input = array(), $products = array())
220
    {
221
        $order_id = $this->createOrder($input);
222
        if ($order_id == 0) {
223
            $this->error->set('unable to create the order');
224
            return false;
225
        }
226
227
        if (!$this->addOrderLines($products)) {
228
            $this->error->set('unable add products to the order');
229
            return false;
230
        }
231
232
        if (!$this->sendEmail($order_id)) {
233
            $this->error->set('unable to send email to the customer');
234
            return false;
235
        }
236
237
        return $order_id;
238
    }
239
240
    /**
241
     * Places the order and utilizes basket