Nip_Form_Renderer_Button_Input   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 18
ccs 0
cts 9
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A generateItem() 0 5 1
A getAllowedAttributes() 0 6 1
1
<?php
2
3
class Nip_Form_Renderer_Button_Input extends Nip_Form_Renderer_Button_Abstract
4
{
5
    public function generateItem()
6
    {
7
        $this->getItem()->setValue($this->getItem()->getLabel());
8
        $return = '<input ' . $this->renderAttributes() . ' />';
9
        return $return;
10
    }
11
12
    /**
13
     * @inheritDoc
14
     */
15
    public function getAllowedAttributes()
16
    {
17
        $attribs = parent::getAllowedAttributes();
18
        $attribs[] = 'type';
19
        $attribs[] = 'value';
20
        return $attribs;
21
    }
22
}
23