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

InputText   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

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