GetSecurityInvoiceResponseContainer   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 38
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getResponse() 0 3 1
A __toString() 0 10 2
A setResponse() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Payone\Business\Api\Response\Container;
9
10
class GetSecurityInvoiceResponseContainer extends AbstractResponseContainer
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $response;
16
17
    /**
18
     * @param string $response
19
     *
20
     * @return void
21
     */
22
    public function setResponse(string $response): void
23
    {
24
        $this->response = $response;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getResponse(): string
31
    {
32
        return $this->response;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function __toString(): string
39
    {
40
        if ($this->isError()) {
41
            $result = parent::__toString();
42
        } else {
43
            $stringArray = ['status=' . $this->getStatus(), 'data=PDF-Content'];
44
            $result = implode('|', $stringArray);
45
        }
46
47
        return $result;
48
    }
49
}
50