Passed
Push — master ( f58784...79a73a )
by Gabriel
14:23
created

Nip_Form_Renderer_Button_Button   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

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