Completed
Push — master ( 59d29e...a24d76 )
by Hannes
02:52 queued 01:58
created

SveaFormat::getClearingValidator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 4
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace byrokrat\banking\Format\Build;
6
7
/**
8
 * This class has been auto-generated and should not be edited directly
9
 *
10
 * Generated in accordance with BGC specifications dated 2019-10-22.
11
 */
12 View Code Duplication
class SveaFormat implements \byrokrat\banking\Format\FormatInterface
0 ignored issues
show
Duplication introduced by
This class 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...
13
{
14
    use \byrokrat\banking\Format\ValidatorJitCache;
15
16 2
    public function getBankName(): string
17
    {
18 2
        return \byrokrat\banking\BankNames::BANK_SVEA;
19
    }
20
21 3
    protected function getClearingValidator(): \byrokrat\banking\Validator\ValidatorInterface
22
    {
23 3
        return new \byrokrat\banking\Validator\ClearingValidator([[9660, 9669]]);
24
    }
25
26
    /**
27
     * @return \byrokrat\banking\Validator\ValidatorInterface[]
28
     */
29 3
    protected function getAdditionalValidators(): array
30
    {
31
        return [
32 3
            new \byrokrat\banking\Validator\CheckDigitType1BValidator,
33 3
            new \byrokrat\banking\Validator\StructType1Validator,
34 3
            new \byrokrat\banking\Validator\NoClearingCheckDigitValidator,
35
        ];
36
    }
37
}
38