Completed
Push — master ( 8c8ceb...a65af7 )
by Sebastian
01:22
created

Textarea::style()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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