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

ClearingSeparatorRewriter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace byrokrat\banking\Rewriter;
4
5
/**
6
 * Replace and unvalid clearing-serial separating dash with a comma
7
 *
8
 * @codeCoverageIgnore
9
 * @deprecated
10
 */
11
class ClearingSeparatorRewriter implements RewriterStrategy
12
{
13
    public function __construct()
14
    {
15
        trigger_error("ClearingSeparatorRewriter is deprecated and will be removed", E_USER_DEPRECATED);
16
    }
17
18
    public function rewrite($number)
19
    {
20
        return preg_replace(
21
            '/-/',
22
            ',',
23
            $number,
24
            1
25
        );
26
    }
27
}
28