Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field/Tags.php 1 location

@@ 62-71 (lines=10) @@
59
     *
60
     * @return $this|array|mixed
61
     */
62
    public function value($value = null)
63
    {
64
        if (is_null($value)) {
65
            return empty($this->value) ? ($this->getDefault() ?? []) : $this->value;
66
        }
67
68
        $this->value = (array) $value;
69
70
        return $this;
71
    }
72
73
    /**
74
     * {@inheritdoc}

src/Form/Field.php 1 location

@@ 501-510 (lines=10) @@
498
     *
499
     * @return mixed
500
     */
501
    public function value($value = null)
502
    {
503
        if (is_null($value)) {
504
            return is_null($this->value) ? $this->getDefault() : $this->value;
505
        }
506
507
        $this->value = $value;
508
509
        return $this;
510
    }
511
512
    /**
513
     * Set default value for field.