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

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