Completed
Push — master ( 67c338...c7b167 )
by Wanderson
04:24
created

Checkbox   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
 * Checkbox
5
 * Auxilia nas <input type="checkbox">
6
 * @author WebCorpore
7
 */
8
9
namespace Win\Html\Form;
10
11
class Checkbox {
12
13
    /**
14
     * Retorna checked="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
            return 'checked="true"';
21
        }
22
    }
23
24
}
25