Button   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 3
Bugs 1 Features 1
Metric Value
wmc 3
c 3
b 1
f 1
lcom 0
cbo 3
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tagName() 0 4 1
A __construct() 0 5 2
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