Passed
Push — master ( 989b89...953640 )
by Wanderson
01:50
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\Input;
4
5
use Win\Html\Form\Input;
6
7
/**
8
 * Input de Texto
9
 * <input type="text">
10
 */
11
class InputText extends Input {
12
13
	/**
14
	 * @param string $name
15
	 * @param string $value
16
	 * @param string[] $attributes
17
	 */
18
	public function __construct($name, $value = '', $attributes = []) {
19
		parent::__construct('text', $name, $value, $attributes);
20
	}
21
22
	/** @return string */
23
	public function html() {
24
		return '<input type="' . $this->type . '" name="' . $this->name . '" value="' . $this->value . '" ' . $this->attributes() . '/>';
25
	}
26
27
}
28