Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field.php 1 location

@@ 495-504 (lines=10) @@
492
     *
493
     * @return mixed
494
     */
495
    public function value($value = null)
496
    {
497
        if (is_null($value)) {
498
            return is_null($this->value) ? $this->getDefault() : $this->value;
499
        }
500
501
        $this->value = $value;
502
503
        return $this;
504
    }
505
506
    /**
507
     * Set default value for field.

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}