Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field.php 1 location

@@ 554-563 (lines=10) @@
551
     *
552
     * @return mixed
553
     */
554
    public function value($value = null)
555
    {
556
        if (is_null($value)) {
557
            return is_null($this->value) ? $this->getDefault() : $this->value;
558
        }
559
560
        $this->value = $value;
561
562
        return $this;
563
    }
564
565
    /**
566
     * Set default value for field.

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}