CylindreeSanitizer::clean()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Lbc\Filter;
4
5
class CylindreeSanitizer implements SanitizerInterface
6
{
7 2
    public function clean($value)
8
    {
9 2
        return (int) preg_replace(
10 2
            '/ cm3/',
11 2
            '',
12 2
            (new DefaultSanitizer)->clean($value)
13
        );
14
    }
15
}
16