Code Duplication    Length = 3-3 lines in 2 locations

source/Spiral/ORM/RecordEntity.php 2 locations

@@ 494-496 (lines=3) @@
491
     */
492
    public function setField($name, $value, $filter = true)
493
    {
494
        if (!array_key_exists($name, $this->fields)) {
495
            throw new RecordException("Undefined field '{$name}' in '" . static::class . "'.");
496
        }
497
498
        $original = isset($this->fields[$name]) ? $this->fields[$name] : null;
499
        if ($value === null && in_array($name, $this->ormSchema[ORM::M_NULLABLE])) {
@@ 520-522 (lines=3) @@
517
     */
518
    public function getField($name, $default = null, $filter = true)
519
    {
520
        if (!array_key_exists($name, $this->fields)) {
521
            throw new RecordException("Undefined field '{$name}' in '" . static::class . "'.");
522
        }
523
524
        $value = $this->fields[$name];
525
        if ($value === null && in_array($name, $this->ormSchema[ORM::M_NULLABLE])) {