Passed
Push — master ( 989b89...953640 )
by Wanderson
01:50
created

Checkbox   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A check() 0 2 2
1
<?php
2
3
namespace Win\Html\Form\Input;
4
5
use Win\Request\Input;
6
7
/**
8
 * Checkbox
9
 * <input type="checkbox">
10
 *
11
 */
12
class Checkbox extends Input{
13
14
	/**
15
	 * Retorna "checked" se os valores são iguais
16
	 * @param mixed $value1
17
	 * @param mixed $value2
18
	 * @return string
19
	 */
20
	public static function check($value1, $value2 = true) {
21
		return ($value1 == $value2) ? 'checked ' : '';
22
	}
23
24
}
25