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

IntegerConverter::convert()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
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