Completed
Push — master ( 4f4c40...0c6376 )
by Florian
02:24
created

FloatConverter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

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
12
namespace Plum\Plum\Converter;
13
14
/**
15
 * FloatConverter.
16
 *
17
 * @author    Florian Eckerstorfer <[email protected]>
18
 * @copyright 2014-2016 Florian Eckerstorfer
19
 */
20
class FloatConverter implements ConverterInterface
21
{
22
    /**
23
     * @param mixed $item
24
     *
25
     * @return float
26
     */
27 2
    public function convert($item)
28
    {
29 2
        return floatval($item);
30
    }
31
}
32