GetSecurityInvoiceResponseContainer::getResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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