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

Checkbox::check()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 2
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\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