Completed
Pull Request — 2.x (#43)
by jake
02:49 queued 50s
created

Textarea   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 50%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
c 3
b 0
f 0
lcom 0
cbo 2
dl 0
loc 16
ccs 2
cts 4
cp 0.5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 6 1
1
<?php
2
/**
3
 *
4
 * This file is part of Aura for PHP.
5
 *
6
 * @license http://opensource.org/licenses/bsd-license.php BSD
7
 *
8
 */
9
namespace Aura\Html\Helper\Input;
10
11
/**
12
 *
13
 * An HTML textarea input.
14
 *
15
 * @package Aura.Html
16
 *
17
 */
18
class Textarea extends AbstractInput
19
{
20
    /**
21
     *
22
     * Returns the HTML for the input.
23
     *
24
     * @return string
25
     *
26
     */
27 2
    public function __toString()
28
    {
29
        $attribs = $this->escaper->attr($this->attribs);
30
        $value = $this->escaper->html($this->value);
31 2
        return "<textarea {$attribs}>{$value}</textarea>";
32
    }
33
}
34