Select::addChild()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 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