Code Duplication    Length = 19-19 lines in 2 locations

class/oledrion_delivery_payment.php 1 location

@@ 74-92 (lines=19) @@
71
     * @param $parameters
72
     * @return array
73
     */
74
    public function getDeliveryPaymantId($parameters)
75
    {
76
        $ret = array();
77
        if (!$parameters['delivery']) {
78
            return $ret;
79
        }
80
        $critere = new CriteriaCompo();
81
        $critere->add(new Criteria('dp_delivery', $parameters['delivery']));
82
        $obj = $this->getObjects($critere);
83
        if ($obj) {
84
            foreach ($obj as $root) {
85
                $tab                              = array();
86
                $tab                              = $root->toArray();
87
                $ret[$root->getVar('dp_payment')] = $tab;
88
            }
89
        }
90
91
        return $ret;
92
    }
93
}
94

class/oledrion_location_delivery.php 1 location

@@ 76-94 (lines=19) @@
73
     * @param $parameters
74
     * @return array
75
     */
76
    public function getLocationDeliveryId($parameters)
77
    {
78
        $ret = array();
79
        if (!$parameters['location']) {
80
            return $ret;
81
        }
82
        $critere = new CriteriaCompo();
83
        $critere->add(new Criteria('ld_location', $parameters['location']));
84
        $obj = $this->getObjects($critere);
85
        if ($obj) {
86
            foreach ($obj as $root) {
87
                $tab                               = array();
88
                $tab                               = $root->toArray();
89
                $ret[$root->getVar('ld_delivery')] = $tab;
90
            }
91
        }
92
93
        return $ret;
94
    }
95
96
    /**
97
     * @param $ld_delivery