Completed
Push — master ( b5ae25...349033 )
by Frederik
02:37
created

V04   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 5
dl 0
loc 39
ccs 8
cts 12
cp 0.6667
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getXmlNs() 0 4 1
A getMsgId() 0 4 1
A getName() 0 4 1
A getDecoder() 0 9 1
1
<?php
2
3
namespace Genkgo\Camt\Camt053\MessageFormat;
4
5
use Genkgo\Camt\Camt053;
6
use Genkgo\Camt\Decoder;
7
use Genkgo\Camt\DecoderInterface;
8
use Genkgo\Camt\MessageFormatInterface;
9
10
/**
11
 * Class MessageFormat
12
 * @package Genkgo\Camt\Camt053
13
 */
14
final class V04 implements MessageFormatInterface
15
{
16
    /**
17
     * @return string
18
     */
19
    public function getXmlNs()
20
    {
21
        return 'urn:iso:std:iso:20022:tech:xsd:camt.053.001.04';
22
    }
23
24
    /**
25
     * @return string
26
     */
27 6
    public function getMsgId()
28
    {
29 6
        return 'camt.053.001.04';
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getName()
36
    {
37
        return 'BankToCustomerStatementV04';
38
    }
39
40
    /**
41
     * @return DecoderInterface
42
     */
43 6
    public function getDecoder()
44
    {
45 6
        $entryTransactionDetailDecoder = new Camt053\Decoder\EntryTransactionDetail();
46 6
        $entryDecoder                  = new Decoder\Entry($entryTransactionDetailDecoder);
47 6
        $recordDecoder                 = new Decoder\Record($entryDecoder);
48 6
        $messageDecoder                = new Camt053\Decoder\Message($recordDecoder);
49
50 6
        return new Decoder($messageDecoder, sprintf('/assets/%s.xsd', $this->getMsgId()));
51
    }
52
}
53