Completed
Pull Request — master (#13)
by
unknown
02:23
created

Bankgiro::getClearingNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace byrokrat\banking;
4
5
/**
6
 * Account number for Bankgirot clearing system
7
 */
8
class Bankgiro extends BaseAccount
9
{
10 View Code Duplication
    public function getNumber()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
    {
12
        return sprintf(
13
            '%s-%s%s',
14
            substr($this->getSerialNumber(), 0, -3),
15
            substr($this->getSerialNumber(), -3),
16
            $this->getCheckDigit()
17
        );
18
    }
19
20
    public function getClearingNumber()
21
    {
22
        return '0000';
23
    }
24
25
    public function getSerialNumber()
26
    {
27
        return str_replace('-', '', parent::getSerialNumber());
28
    }
29
}
30