IntegerConverter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of plumphp/plum.
5
 *
6
 * (c) Florian Eckerstorfer <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Plum\Plum\Converter;
12
13
/**
14
 * NullConverter.
15
 *
16
 * @author    Florian Eckerstorfer <[email protected]>
17
 * @copyright 2014-2016 Florian Eckerstorfer
18
 */
19
class IntegerConverter implements ConverterInterface
20
{
21
    /**
22
     * Converts the item into an integer value.
23
     *
24
     * @param mixed $item
25
     *
26
     * @return int
27
     */
28
    public function convert($item)
29
    {
30
        return intval($item);
31
    }
32
}
33