Passed
Push — master ( 68d467...3da7f9 )
by Mikael
02:33
created

FormElementInputButton::getHTML()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 11
ccs 6
cts 6
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Anax\HTMLForm;
4
5
/**
6
 * Ordinary input form element
7
 */
8
class FormElementInputButton extends FormElement
9
{
10
    /**
11
     * Get HTML code for a element.
12
     *
13
     * @return string HTML code for the element.
14
     *
15
     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
16
     */
17 2
    public function getHTML()
18
    {
19 2
        $details = $this->getHTMLDetails();
20 2
        extract($details);
21
22
        return <<<EOD
23
<span>
24 2
<input id='$id'{$type}{$class}{$name}{$value}{$autofocus}{$readonly}{$novalidate}{$title}{$onclick} />
25 2
</span>
26 2
EOD;
27
    }
28
}
29