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

ClearingSeparatorRewriter::rewrite()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 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