Completed
Pull Request — master (#26)
by X
02:26
created

IntegerConverter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 0
cts 4
cp 0
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 boolean
0 ignored issues
show
Documentation introduced by
Should the return type not be integer?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
17
     */
18
    public function convert($input)
19
    {
20
        return intval($input, 10);
21
    }
22
}
23