Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field/Checkbox.php 1 location

@@ 67-76 (lines=10) @@
64
     *
65
     * @return $this
66
     */
67
    public function checked($checked = [])
68
    {
69
        if ($checked instanceof Arrayable) {
70
            $checked = $checked->toArray();
71
        }
72
73
        $this->checked = (array) $checked;
74
75
        return $this;
76
    }
77
78
    /**
79
     * Draw inline checkboxes.

src/Form/Field.php 1 location

@@ 518-527 (lines=10) @@
515
     *
516
     * @return $this
517
     */
518
    public function checked($checked = [])
519
    {
520
        if ($checked instanceof Arrayable) {
521
            $checked = $checked->toArray();
522
        }
523
524
        $this->checked = array_merge($this->checked, $checked);
525
526
        return $this;
527
    }
528
529
    /**
530
     * Add `required` attribute to current field if has required rule,