Completed
Push — master ( 1d0973...9e97b2 )
by Hannes
02:10
created

ClearingSeparatorRewriter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A rewrite() 0 9 1
1
<?php
2
3
namespace byrokrat\banking\Rewriter;
4
5
/**
6
 * Replace and unvalid clearing-serial separating dash with a comma
7
 */
8
class ClearingSeparatorRewriter implements RewriterStrategy
9
{
10 1
    public function rewrite($number)
11
    {
12 1
        return preg_replace(
13 1
            '/-/',
14 1
            ',',
15
            $number,
16 1
            1
17
        );
18
    }
19
}
20