Completed
Push — master ( 8c66d9...9360f0 )
by Hannes
03:21 queued 02:00
created

NonDigitRemovingRewriter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A rewrite() 0 4 1
1
<?php
2
3
namespace byrokrat\banking\Rewriter;
4
5
/**
6
 * Remove all characters that are not digits from account number
7
 */
8
class NonDigitRemovingRewriter implements RewriterStrategy
9
{
10 100
    public function rewrite($number)
11
    {
12 100
        return preg_replace('/[^0-9,]/', '', $number);
13
    }
14
}
15