Completed
Push — master ( 925561...110c68 )
by Adrien
11:10
created

V06::getMsgId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Genkgo\Camt\Camt052\MessageFormat;
6
7
use Genkgo\Camt\Camt052;
8
use Genkgo\Camt\Decoder;
9
use Genkgo\Camt\DecoderInterface;
10
use Genkgo\Camt\MessageFormatInterface;
11
12
/**
13
 * Class MessageFormat
14
 * @package Genkgo\Camt\Camt052
15
 */
16
final class V06 implements MessageFormatInterface
17
{
18
    /**
19
     * @return string
20
     */
21 2
    public function getXmlNs(): string
22
    {
23 2
        return 'urn:iso:std:iso:20022:tech:xsd:camt.052.001.06';
24
    }
25
26
    /**
27
     * @return string
28
     */
29 1
    public function getMsgId(): string
30
    {
31 1
        return 'camt.052.001.06';
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getName(): string
38
    {
39
        return 'BankToCustomerAccountReportV06';
40
    }
41
42
    /**
43
     * @return DecoderInterface
44
     */
45 1
    public function getDecoder(): DecoderInterface
46
    {
47 1
        $entryTransactionDetailDecoder = new Camt052\Decoder\EntryTransactionDetail(new Decoder\Date());
48 1
        $entryDecoder                  = new Decoder\Entry($entryTransactionDetailDecoder);
49 1
        $recordDecoder                 = new Decoder\Record($entryDecoder, new Decoder\Date());
50 1
        $messageDecoder                = new Camt052\Decoder\V06\Message($recordDecoder, new Decoder\Date());
51
52 1
        return new Decoder($messageDecoder, sprintf('/assets/%s.xsd', $this->getMsgId()));
53
    }
54
}
55