Code Duplication    Length = 10-10 lines in 2 locations

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.

src/Form/Field.php 1 location

@@ 504-513 (lines=10) @@
501
     *
502
     * @return $this
503
     */
504
    public function checked($checked = [])
505
    {
506
        if ($checked instanceof Arrayable) {
507
            $checked = $checked->toArray();
508
        }
509
510
        $this->checked = array_merge($this->checked, $checked);
511
512
        return $this;
513
    }
514
515
    /**
516
     * Add `required` attribute to current field if has required rule,