Completed
Pull Request — master (#18)
by Hannes
06:53
created

PlusgiroFormatter::format()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
ccs 5
cts 5
cp 1
crap 1
1
<?php
2
3
namespace byrokrat\banking\Formatter;
4
5
use byrokrat\banking\AccountNumber;
6
7
class PlusgiroFormatter implements FormatterInterface
8
{
9 1
    public function format(AccountNumber $number): string
10
    {
11 1
        return sprintf(
12 1
            '%s-%s',
13 1
            $number->getSerialNumber(),
14 1
            $number->getCheckDigit()
15
        );
16
    }
17
}
18