Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field.php 1 location

@@ 495-504 (lines=10) @@
492
     *
493
     * @return $this
494
     */
495
    public function checked($checked = [])
496
    {
497
        if ($checked instanceof Arrayable) {
498
            $checked = $checked->toArray();
499
        }
500
501
        $this->checked = array_merge($this->checked, $checked);
502
503
        return $this;
504
    }
505
506
    /**
507
     * Add `required` attribute to current field if has required rule,

src/Form/Field/Checkbox.php 1 location

@@ 60-69 (lines=10) @@
57
     *
58
     * @return $this
59
     */
60
    public function checked($checked = [])
61
    {
62
        if ($checked instanceof Arrayable) {
63
            $checked = $checked->toArray();
64
        }
65
66
        $this->checked = (array)$checked;
67
68
        return $this;
69
    }
70
71
    /**
72
     * Draw inline checkboxes.