Code Duplication    Length = 5-5 lines in 2 locations

src/Observers/ProductObserver.php 2 locations

@@ 60-64 (lines=5) @@
57
58
        // prepare the date format for the created at date
59
        $createdAt = date('Y-m-d H:i:s');
60
        if (isset($row[$headers[ColumnKeys::CREATED_AT]])) {
61
            if ($cda = \DateTime::createFromFormat($this->getSourceDateFormat(), $row[$headers[ColumnKeys::CREATED_AT]])) {
62
                $createdAt = $cda->format('Y-m-d H:i:s');
63
            }
64
        }
65
66
        // prepare the date format for the updated at date
67
        $updatedAt = date('Y-m-d H:i:s');
@@ 68-72 (lines=5) @@
65
66
        // prepare the date format for the updated at date
67
        $updatedAt = date('Y-m-d H:i:s');
68
        if (isset($row[$headers[ColumnKeys::UPDATED_AT]])) {
69
            if ($uda = \DateTime::createFromFormat($this->getSourceDateFormat(), $row[$headers[ColumnKeys::UPDATED_AT]])) {
70
                $updatedAt = $uda->format('Y-m-d H:i:s');
71
            }
72
        }
73
74
        // load the product's attribute set
75
        $attributeSet = $this->getAttributeSetByAttributeSetName($row[$headers[ColumnKeys::ATTRIBUTE_SET_CODE]]);