Code Duplication    Length = 17-18 lines in 2 locations

src/Grid/Displayers/Input.php 1 location

@@ 7-23 (lines=17) @@
4
5
use Encore\Admin\Admin;
6
7
class Input extends AbstractDisplayer
8
{
9
    public function display($mask = '')
10
    {
11
        $name = $this->column->getName();
12
13
        return Admin::component('admin::grid.inline-edit.input', [
14
            'key'      => $this->getKey(),
15
            'value'    => $this->getValue(),
16
            'name'     => $name,
17
            'resource' => $this->getResource(),
18
            'trigger'  => "ie-trigger-{$name}",
19
            'target'   => "ie-content-{$name}-{$this->getKey()}",
20
            'mask'     => $mask,
21
        ]);
22
    }
23
}
24

src/Grid/Displayers/Radio.php 1 location

@@ 7-24 (lines=18) @@
4
5
use Encore\Admin\Admin;
6
7
class Radio extends AbstractDisplayer
8
{
9
    public function display($options = [])
10
    {
11
        $name = $this->column->getName();
12
13
        return Admin::component('admin::grid.inline-edit.radio', [
14
            'key'      => $this->getKey(),
15
            'value'    => $this->getValue(),
16
            'name'     => $name,
17
            'resource' => $this->getResource(),
18
            'trigger'  => "ie-trigger-{$name}",
19
            'target'   => "ie-content-{$name}-{$this->getKey()}",
20
            
21
            'options'  => $options,
22
        ]);
23
    }
24
}
25