Completed
Pull Request — master (#1)
by Dmitry
11:43 queued 10:09
created

RedirectPurchaseResponse::setMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace hiqdev\php\merchant\response;
4
5
/**
6
 * Class RedirectPurchaseResponse
7
 *
8
 * @author Dmytro Naumenko <[email protected]>
9
 */
10
class RedirectPurchaseResponse
11
{
12
    /**
13
     * @var string
14
     */
15
    private $url;
16
    /**
17
     * @var array
18
     */
19
    private $data;
20
    /**
21
     * @var string
22
     */
23
    private $method = 'POST';
24
25
    public function __construct(string $url, array $data)
26
    {
27
        $this->url = $url;
28
        $this->data = $data;
29
    }
30
31
    public function getRedirectUrl(): string
32
    {
33
        return $this->url;
34
    }
35
36
    public function getRedirectData(): array
37
    {
38
        return $this->data;
39
    }
40
41
    public function setMethod($method)
42
    {
43
        $this->method = $method;
44
45
        return $this;
46
    }
47
48
    public function getMethod()
49
    {
50
        return $this->method;
51
    }
52
}
53