Select   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tagName() 0 4 1
A isValidChild() 0 4 1
A addChild() 0 5 1
1
<?php
2
3
namespace hemio\html;
4
5
/**
6
 * The <code>select</code> element represents a control for selecting among a list of
7
  options.
8
 *
9
 * @since version 1.0
10
 * @url http://www.w3.org/TR/html5/forms.html#the-select-element
11
 */
12
class Select extends Abstract_\ElementContent implements Interface_\Submittable
13
{
14
15
    use Trait_\Submittable;
16
17
    public static function tagName()
18
    {
19
        return 'select';
20
    }
21
22
    public function isValidChild(Interface_\HtmlCode $child)
23
    {
24
        return $child instanceof Interface_\ContentModelSelect;
25
    }
26
27
    public function addChild(Interface_\ContentModelSelect $child)
28
    {
29
        $this->addChildInternal($child);
30
        return $child;
31
    }
32
}
33