Nip_Form_Renderer_Elements_Textarea   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 9
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 10
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A generateElement() 0 6 1
A getElementAttribs() 0 6 1
1
<?php
2
3
class Nip_Form_Renderer_Elements_Textarea extends \Nip\Form\Renderer\Elements\AbstractElementRenderer
4
{
5
    public function generateElement()
6
    {
7
        $return = '<textarea ';
8
        $return .= $this->renderAttributes();
9
        $return .= ' >' . $this->getElement()->getValue() . '</textarea>';
10
        return $return;
11
    }
12
13
    public function getElementAttribs()
14
    {
15
        $attribs = parent::getElementAttribs();
16
        $attribs[] = 'rows';
17
        $attribs[] = 'cols';
18
        return $attribs;
19
    }
20
}
21