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

@@ 787-796 (lines=10) @@
784
     *
785
     * @return mixed
786
     */
787
    public function value($value = null)
788
    {
789
        if (is_null($value)) {
790
            return is_null($this->value) ? $this->getDefault() : $this->value;
791
        }
792
793
        $this->value = $value;
794
795
        return $this;
796
    }
797
798
    /**
799
     * Set or get data.