Completed
Push — master ( ab552b...d4be16 )
by Sebastian
04:42
created

Textarea::name()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Spatie\Html\Elements;
4
5
use Spatie\Html\BaseElement;
6
7
class Textarea extends BaseElement
8
{
9
    protected $tag = 'textarea';
10
11
    /**
12
     * @return static
13
     */
14
    public function autofocus()
15
    {
16
        return $this->attribute('autofocus');
17
    }
18
19
    /**
20
     * @return static
21
     */
22
    public function placeholder(string $placeholder)
23
    {
24
        return $this->attribute('placeholder', $placeholder);
25
    }
26
27
    /**
28
     * @param string $name
29
     *
30
     * @return static
31
     */
32
    public function name(?string $name)
33
    {
34
        return $this->attribute('name', $name);
35
    }
36
37
    /**
38
     * @param string $value
39
     *
40
     * @return static
41
     */
42
    public function value(?string $value)
43
    {
44
        return $this->html($value);
45
    }
46
}
47