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

FormElementInputButton   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHTML() 0 11 1
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