Code Duplication    Length = 8-9 lines in 2 locations

code/model/process/OrderStep_RecordDeviceDetails.php 1 location

@@ 51-58 (lines=8) @@
48
    public function doStep(Order $order)
49
    {
50
        $className = $this->getRelevantLogEntryClassName();
51
        if (class_exists($className)) {
52
            $obj = $className::create();
53
            if (is_a($obj, Object::getCustomClass('OrderStatusLog'))) {
54
                $obj->OrderID = $order->ID;
55
                $obj->Title = $this->Name;
56
                $obj->write();
57
            }
58
        }
59
        return true;
60
    }
61

code/model/process/OrderStep_FraudCheck.php 1 location

@@ 104-112 (lines=9) @@
101
102
        $className = $this->getRelevantLogEntryClassName();
103
104
        if (class_exists($className)) {
105
            $obj = $className::create();
106
            if (is_a($obj, Object::getCustomClass('OrderStatusLog'))) {
107
                $obj->OrderID = $order->ID;
108
                $obj->Title = $this->Name;
109
                $obj->ServiceType = $this->MinFraudService;
110
                $obj->write();
111
            }
112
        }
113
114
        return true;
115
    }