Passed
Push — master ( 93a267...f5acbf )
by X
32s
created

IntegerConverter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 4 1
1
<?php
2
/**
3
 * converter for integer
4
 */
5
namespace xKerman\Restricted;
6
7
/**
8
 * Converter for integer
9
 */
10
class IntegerConverter implements ConverterInterface
11
{
12
    /**
13
     * convert given input to integer
14
     *
15
     * @param string $input input for converter
16
     * @return integer
17
     */
18 7
    public function convert($input)
19
    {
20 7
        return intval($input, 10);
21
    }
22
}
23