Button::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>button</code> element represents a button labeled by its contents.
7
 *
8
 * @since 1.0
9
 * @url http://www.w3.org/TR/html5/forms.html#the-button-element
10
 */
11
class Button extends Abstract_\ElementContent implements Interface_\Submittable
12
{
13
14
    use Trait_\Submittable,
15
        Trait_\DefaultElementContent;
16
17
    public static function tagName()
18
    {
19
        return 'button';
20
    }
21
22
    /**
23
     *
24
     * @param string $type
25
     */
26
    public function __construct($type = null)
27
    {
28
        if ($type !== null)
29
            $this->setAttribute('type', $type);
30
    }
31
}
32