Code Duplication    Length = 11-11 lines in 2 locations

src/Fields/HiddenField.php 1 location

@@ 16-26 (lines=11) @@
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function renderInput(InputRenderer $renderer, InputModel $model, array $attr)
17
    {
18
        return $renderer->tag(
19
            'input',
20
            $attr + [
21
                'type' => 'hidden',
22
                'name' => $renderer->getName($this),
23
                'value' => $model->getInput($this),
24
            ]
25
        );
26
    }
27
}
28

src/Fields/TokenField.php 1 location

@@ 37-47 (lines=11) @@
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function renderInput(InputRenderer $renderer, InputModel $model, array $attr)
38
    {
39
        return $renderer->tag(
40
            'input',
41
            $attr + [
42
                'type'  => 'hidden',
43
                'name'  => $renderer->getName($this),
44
                'value' => $this->service->createToken($this->getName()),
45
            ]
46
        );
47
    }
48
49
    /**
50
     * {@inheritdoc}