Completed
Push — master ( 8a72c5...5d7225 )
by Sebastian
01:19
created

Textarea   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 50
rs 10
c 1
b 0
f 0
wmc 5
lcom 1
cbo 1

5 Methods

Rating   Name   Duplication   Size   Complexity  
A autofocus() 0 4 1
A placeholder() 0 4 1
A name() 0 4 1
A required() 0 4 1
A value() 0 4 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
     * @param string|null $placeholder
21
     *
22
     * @return static
23
     */
24
    public function placeholder($placeholder)
25
    {
26
        return $this->attribute('placeholder', $placeholder);
27
    }
28
29
    /**
30
     * @param string $name
31
     *
32
     * @return static
33
     */
34
    public function name($name)
35
    {
36
        return $this->attribute('name', $name);
37
    }
38
39
    /**
40
     * @return static
41
     */
42
    public function required()
43
    {
44
        return $this->attribute('required');
45
    }
46
47
    /**
48
     * @param string|null $value
49
     *
50
     * @return static
51
     */
52
    public function value($value)
53
    {
54
        return $this->html($value);
55
    }
56
}
57