FloatReplacingStrategy   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isApplicable() 0 3 1
A replace() 0 3 1
1
<?php
2
3
namespace Xsolve\SalesforceClient\QueryBuilder\Visitor\Parameters;
4
5
class FloatReplacingStrategy implements ReplacingStrategyInterface
6
{
7 11
    public function isApplicable(Type $type): bool
8
    {
9 11
        return Type::FLOAT() === $type;
10
    }
11
12 7
    public function replace($value): string
13
    {
14 7
        return (string) floatval($value);
15
    }
16
}
17