Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field/Checkbox.php 1 location

@@ 44-53 (lines=10) @@
41
     *
42
     * @return $this
43
     */
44
    public function checked($checked = [])
45
    {
46
        if ($checked instanceof Arrayable) {
47
            $checked = $checked->toArray();
48
        }
49
50
        $this->checked = (array) $checked;
51
52
        return $this;
53
    }
54
55
    /**
56
     * Draw inline checkboxes.

src/Form/Field.php 1 location

@@ 453-462 (lines=10) @@
450
     *
451
     * @return $this
452
     */
453
    public function checked($checked = [])
454
    {
455
        if ($checked instanceof Arrayable) {
456
            $checked = $checked->toArray();
457
        }
458
459
        $this->checked = array_merge($this->checked, $checked);
460
461
        return $this;
462
    }
463
464
    /**
465
     * Add `required` attribute to current field if has required rule,