Completed
Push — master ( c7b167...faaa80 )
by Wanderson
02:08
created

Select   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A active() 0 5 2
1
<?php
2
3
/**
4
 * Select
5
 * Auxilia nas <select>
6
 * @author WebCorpore
7
 */
8
9
namespace Win\Html\Form;
10
11
class Select {
12
13
	/**
14
	 * Retorna selected="true" se os valores são iguais
15
	 * @param mixed $value1
16
	 * @param mixed $value2
17
	 */
18
	public static function active($value1, $value2 = true) {
19
		if ($value1 == $value2) {
20
			echo 'selected="true"';
21
		}
22
	}
23
24
}
25