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

ReturnInformation::fromUnstructured()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
crap 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