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

@@ 570-579 (lines=10) @@
567
     *
568
     * @return mixed
569
     */
570
    public function value($value = null)
571
    {
572
        if (is_null($value)) {
573
            return is_null($this->value) ? $this->getDefault() : $this->value;
574
        }
575
576
        $this->value = $value;
577
578
        return $this;
579
    }
580
581
    /**
582
     * Set or get data.