Code Duplication    Length = 9-9 lines in 3 locations

class/oledrion_commands.php 3 locations

@@ 292-300 (lines=9) @@
289
     * @param  string                   $comment Optionel, un commentaire pour le mail envoyé au webmaster
290
     * @return bool                     Indique si la validation de la commande s'est bien faite ou pas
291
     */
292
    public function packOrder(Oledrion_commands $order, $comment = '')
293
    {
294
        $retval = false;
295
        $order->setVar('cmd_state', OLEDRION_STATE_PACKED);
296
        $order->setVar('cmd_comment', $comment);
297
        $retval = $this->insert($order, true);
298
299
        return $retval;
300
    }
301
302
    /**
303
     * submit d'une commande et mise à jour des stocks
@@ 309-317 (lines=9) @@
306
     * @param  string                   $comment Optionel, un commentaire pour le mail envoyé au webmaster
307
     * @return bool                     Indique si la validation de la commande s'est bien faite ou pas
308
     */
309
    public function submitOrder(Oledrion_commands $order, $comment = '')
310
    {
311
        $retval = false;
312
        $order->setVar('cmd_state', OLEDRION_STATE_SUBMITED);
313
        $order->setVar('cmd_comment', $comment);
314
        $retval = $this->insert($order, true);
315
316
        return $retval;
317
    }
318
319
    /**
320
     * delivery d'une commande et mise à jour des stocks
@@ 326-334 (lines=9) @@
323
     * @param  string                   $comment Optionel, un commentaire pour le mail envoyé au webmaster
324
     * @return bool                     Indique si la validation de la commande s'est bien faite ou pas
325
     */
326
    public function deliveryOrder(Oledrion_commands $order, $comment = '')
327
    {
328
        $retval = false;
329
        $order->setVar('cmd_state', OLEDRION_STATE_DELIVERYED);
330
        $order->setVar('cmd_comment', $comment);
331
        $retval = $this->insert($order, true);
332
333
        return $retval;
334
    }
335
336
    /**
337
     * Informe le propriétaire du site qu'une commande est frauduleuse