Input::tagName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace hemio\html;
4
5
/**
6
 * The <code>input</code> element represents a typed data field, usually with a form control
7
 * to allow the user to edit the data.
8
 *
9
 * @since 1.0
10
 * @url http://www.w3.org/TR/html5/forms.html#the-input-element
11
 */
12
class Input extends Abstract_\ElementEmpty implements Interface_\Submittable
13
{
14
15
    use Trait_\Submittable;
16
17
    /**
18
     *
19
     * @param string $type
20
     */
21
    public function __construct($type = null)
22
    {
23
        if ($type !== null)
24
            $this->setAttribute('type', $type);
25
    }
26
27
    public static function tagName()
28
    {
29
        return 'input';
30
    }
31
}
32