Completed
Push — master ( ac62eb...633109 )
by Dawid
03:39
created

FloatNumber   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hydrate() 0 3 1
A extract() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Igni\Storage\Mapping\Strategy;
4
5
use Igni\Storage\Mapping\MappingStrategy;
6
7
final class FloatNumber implements MappingStrategy
8
{
9 7
    public static function hydrate(&$value): void
10
    {
11 7
        $value = (float) $value;;
12 7
    }
13
14 3
    public static function extract(&$value): void
15
    {
16 3
        $value = (float) $value;
17 3
    }
18
}
19