Code Duplication    Length = 10-10 lines in 4 locations

src/Form/Field/Checkbox.php 1 location

@@ 26-35 (lines=10) @@
23
     *
24
     * @return $this|mixed
25
     */
26
    public function options($options = [])
27
    {
28
        if ($options instanceof Arrayable) {
29
            $options = $options->toArray();
30
        }
31
32
        $this->options = (array) $options;
33
34
        return $this;
35
    }
36
37
    /**
38
     * Draw inline checkboxes.

src/Form/Field/Radio.php 1 location

@@ 27-36 (lines=10) @@
24
     *
25
     * @return $this
26
     */
27
    public function options($options = [])
28
    {
29
        if ($options instanceof Arrayable) {
30
            $options = $options->toArray();
31
        }
32
33
        $this->options = (array) $options;
34
35
        return $this;
36
    }
37
38
    /**
39
     * Draw inline radios.

src/Grid/Filter/Presenter/Radio.php 1 location

@@ 27-36 (lines=10) @@
24
     *
25
     * @param array $options
26
     */
27
    public function __construct($options = [])
28
    {
29
        if ($options instanceof Arrayable) {
30
            $options = $options->toArray();
31
        }
32
33
        $this->options = (array) $options;
34
35
        return $this;
36
    }
37
38
    /**
39
     * Draw stacked radios.

src/Form/Field.php 1 location

@@ 384-393 (lines=10) @@
381
     *
382
     * @return $this
383
     */
384
    public function options($options = [])
385
    {
386
        if ($options instanceof Arrayable) {
387
            $options = $options->toArray();
388
        }
389
390
        $this->options = array_merge($this->options, $options);
391
392
        return $this;
393
    }
394
395
    /**
396
     * Get or set rules.