Completed
Pull Request — master (#66)
by
unknown
04:23
created

V01::getDecoder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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