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

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