Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field/Tags.php 1 location

@@ 154-163 (lines=10) @@
151
     *
152
     * @return $this|array|mixed
153
     */
154
    public function value($value = null)
155
    {
156
        if (is_null($value)) {
157
            return empty($this->value) ? ($this->getDefault() ?? []) : $this->value;
158
        }
159
160
        $this->value = (array) $value;
161
162
        return $this;
163
    }
164
165
    /**
166
     * {@inheritdoc}

src/Form/Field.php 1 location

@@ 717-726 (lines=10) @@
714
     *
715
     * @return mixed
716
     */
717
    public function value($value = null)
718
    {
719
        if (is_null($value)) {
720
            return is_null($this->value) ? $this->getDefault() : $this->value;
721
        }
722
723
        $this->value = $value;
724
725
        return $this;
726
    }
727
728
    /**
729
     * Set or get data.