Code Duplication    Length = 3-3 lines in 2 locations

source/Spiral/ORM/RecordEntity.php 2 locations

@@ 461-463 (lines=3) @@
458
     */
459
    public function setField($name, $value, $filter = true)
460
    {
461
        if (!array_key_exists($name, $this->fields)) {
462
            throw new FieldException("Undefined field '{$name}' in '" . static::class . "'.");
463
        }
464
465
        $original = isset($this->fields[$name]) ? $this->fields[$name] : null;
466
        if ($value === null && in_array($name, $this->ormSchema[ORM::M_NULLABLE])) {
@@ 487-489 (lines=3) @@
484
     */
485
    public function getField($name, $default = null, $filter = true)
486
    {
487
        if (!array_key_exists($name, $this->fields)) {
488
            throw new FieldException("Undefined field '{$name}' in '" . static::class . "'.");
489
        }
490
491
        $value = $this->fields[$name];
492
        if ($value === null && in_array($name, $this->ormSchema[ORM::M_NULLABLE])) {