Code Duplication    Length = 4-4 lines in 3 locations

src/ORM/DataObject.php 3 locations

@@ 2128-2131 (lines=4) @@
2125
        }
2126
2127
        // Do we have a field that needs to be lazy loaded?
2128
        if (isset($this->record[$field.'_Lazy'])) {
2129
            $tableClass = $this->record[$field.'_Lazy'];
2130
            $this->loadLazyFields($tableClass);
2131
        }
2132
2133
        // In case of complex fields, return the DBField object
2134
        if (static::getSchema()->compositeField(static::class, $field)) {
@@ 2329-2332 (lines=4) @@
2326
        }
2327
2328
        // If we've just lazy-loaded the column, then we need to populate the $original array
2329
        if (isset($this->record[$fieldName.'_Lazy'])) {
2330
            $tableClass = $this->record[$fieldName.'_Lazy'];
2331
            $this->loadLazyFields($tableClass);
2332
        }
2333
2334
        // Situation 1: Passing an DBField
2335
        if ($val instanceof DBField) {
@@ 2617-2620 (lines=4) @@
2614
            return null;
2615
        }
2616
2617
        if (!isset($this->record[$fieldName]) && isset($this->record[$fieldName . '_Lazy'])) {
2618
            $tableClass = $this->record[$fieldName . '_Lazy'];
2619
            $this->loadLazyFields($tableClass);
2620
        }
2621
2622
        $value = isset($this->record[$fieldName])
2623
            ? $this->record[$fieldName]