Inputs   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A checked() 0 7 2
A selected() 0 7 2
1
<?php
2
namespace Tuum\Form\Data;
3
4
class Inputs extends AbstractData
5
{
6
    /**
7
     * @param string $name
8
     * @param string $value
9
     * @return string
10
     */
11
    public function checked($name, $value)
12
    {
13
        if ($this->exists($name, $value)) {
14
            return ' checked';
15
        }
16
        return '';
17
    }
18
19
    /**
20
     * @param string $name
21
     * @param string $value
22
     * @return string
23
     */
24
    public function selected($name, $value)
25
    {
26
        if ($this->exists($name, $value)) {
27
            return ' selected';
28
        }
29
        return '';
30
    }
31
}