Completed
Push — master ( aabf4d...606f02 )
by Frederik
9s
created

RemittanceInformation   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 83.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 48
ccs 10
cts 12
cp 0.8333
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A fromUnstructured() 0 6 1
A getCreditorReferenceInformation() 0 4 1
A setCreditorReferenceInformation() 0 5 1
A getMessage() 0 4 1
1
<?php
2
3
namespace Genkgo\Camt\Camt053\DTO;
4
5
/**
6
 * Class RemittanceInformation
7
 * @package Genkgo\Camt\Camt053
8
 */
9
class RemittanceInformation
10
{
11
    /**
12
     * @var string
13
     */
14
    private $message;
15
16
    /**
17
     * @var CreditorReferenceInformation
18
     */
19
    private $creditorReferenceInformation;
20
21
    /**
22
     * @param $message
23
     * @return static
24
     */
25 8
    public static function fromUnstructured($message)
26
    {
27 8
        $information = new static;
28 8
        $information->message = $message;
29 8
        return $information;
30
    }
31
32
    /**
33
     * @return CreditorReferenceInformation
34
     */
35
    public function getCreditorReferenceInformation()
36
    {
37
        return $this->creditorReferenceInformation;
38
    }
39
40
    /**
41
     * @param CreditorReferenceInformation $creditorReferenceInformation
42
     */
43 3
    public function setCreditorReferenceInformation($creditorReferenceInformation)
44
    {
45 3
        $this->creditorReferenceInformation = $creditorReferenceInformation;
46 3
        $this->message = $creditorReferenceInformation->getRef();
47 3
    }
48
49
    /**
50
     * @return string
51
     */
52 3
    public function getMessage()
53
    {
54 3
        return $this->message;
55
    }
56
}
57