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

getAllowedAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
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