Completed
Pull Request — master (#19)
by Yann
02:59
created

ReturnInformation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 55.56%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 38
ccs 5
cts 9
cp 0.5556
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCode() 0 4 1
A getAdditionalInformation() 0 4 1
A fromUnstructured() 0 7 1
1
<?php
2
3
namespace Genkgo\Camt\DTO;
4
5
/**
6
 * Class ReturnInformation
7
 * @package Genkgo\Camt\DTO
8
 */
9
class ReturnInformation
10
{
11
    /**
12
     * @var string
13
     */
14
    private $code;
15
    private $additionalInformation;
16
17
    /**
18
     * @return string
19
     */
20
    public function getCode()
21
    {
22
        return $this->code;
23
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function getAdditionalInformation()
29
    {
30
        return $this->additionalInformation;
31
    }
32
33
    /**
34
     * @param $code
35
     * @param $additionalInformation
36
     *
37
     * @return static
38
     */
39 1
    public static function fromUnstructured($code, $additionalInformation)
40
    {
41 1
        $information = new static;
42 1
        $information->code = $code;
43 1
        $information->additionalInformation = $additionalInformation;
44 1
        return $information;
45
    }
46
}
47