SurfaceSanitizer::clean()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 7
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 SurfaceSanitizer implements SanitizerInterface
6
{
7 10
    public function clean($value)
8
    {
9 10
        return (int) preg_replace(
10 10
            '/ cm2/',
11 10
            '',
12 10
            (new DefaultSanitizer)->clean($value));
13
    }
14
}
15