Completed
Push — master ( 3c5c0f...ec5ff6 )
by Laurent
01:40
created

InputTextarea   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 39
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A col() 0 8 1
A row() 0 8 1
1
<?php
2
/**
3
 *
4
 */
5
6
namespace flightlog\form;
7
8
use Webmozart\Assert\Assert;
9
10
/**
11
 * @author Laurent De Coninck <[email protected]>
12
 */
13
class InputTextarea extends BaseInput
14
{
15
    /**
16
     * @param string $name
17
     * @param array  $options
18
     */
19
    public function __construct($name, array $options = [])
20
    {
21
        parent::__construct($name, FormElementInterface::TYPE_TEXTAREA, $options);
22
    }
23
24
    /**
25
     * @param int $number
26
     *
27
     * @return $this
28
     */
29
    public function col($number)
30
    {
31
        Assert::integer($number);
32
33
        $this->setAttribute('cols', $number);
34
35
        return $this;
36
    }
37
38
    /**
39
     * @param int $number
40
     *
41
     * @return $this
42
     */
43
    public function row($number)
44
    {
45
        Assert::integer($number);
46
47
        $this->setAttribute('rows', $number);
48
49
        return $this;
50
    }
51
}