Passed
Branch tests1.5 (59f3fd)
by Wanderson
02:32
created

InputText::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Win\Html\Form;
4
5
/**
6
 * Input de Texto
7
 * <input type="text">
8
 */
9
class InputText extends Input {
10
11
	/**
12
	 * @param string $name
13
	 * @param string $value
14
	 * @param string[] $attributes
15
	 */
16
	public function __construct($name, $value = '', $attributes = []) {
17
		parent::__construct('text', $name, $value, $attributes);
18
	}
19
20
	/** @return string */
21
	public function html() {
22
		return '<input type="' . $this->type . '" name="' . $this->name . '" value="' . $this->value . '" ' . $this->attributes() . '/>';
23
	}
24
25
}
26