Code Duplication    Length = 4-4 lines in 3 locations

src/ORM/DataObject.php 3 locations

@@ 2162-2165 (lines=4) @@
2159
        }
2160
2161
        // Do we have a field that needs to be lazy loaded?
2162
        if (isset($this->record[$field.'_Lazy'])) {
2163
            $tableClass = $this->record[$field.'_Lazy'];
2164
            $this->loadLazyFields($tableClass);
2165
        }
2166
2167
        // In case of complex fields, return the DBField object
2168
        if (static::getSchema()->compositeField(static::class, $field)) {
@@ 2363-2366 (lines=4) @@
2360
        }
2361
2362
        // If we've just lazy-loaded the column, then we need to populate the $original array
2363
        if (isset($this->record[$fieldName.'_Lazy'])) {
2364
            $tableClass = $this->record[$fieldName.'_Lazy'];
2365
            $this->loadLazyFields($tableClass);
2366
        }
2367
2368
        // Situation 1: Passing an DBField
2369
        if ($val instanceof DBField) {
@@ 2651-2654 (lines=4) @@
2648
            return null;
2649
        }
2650
2651
        if (!isset($this->record[$fieldName]) && isset($this->record[$fieldName . '_Lazy'])) {
2652
            $tableClass = $this->record[$fieldName . '_Lazy'];
2653
            $this->loadLazyFields($tableClass);
2654
        }
2655
2656
        $value = isset($this->record[$fieldName])
2657
            ? $this->record[$fieldName]