Completed
Push — master ( 374367...b950ab )
by Vladimir
09:30
created

InitResponse::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AcquiroPay\Gateway\Responses;
6
7
use Illuminate\Contracts\Support\Arrayable;
8
9
class InitResponse implements Arrayable
10
{
11
    private $paymentId;
12
    private $status;
13
    private $additional;
14
15
    public function getPaymentId(): ?string
16
    {
17
        return $this->paymentId;
18
    }
19
20
    public function setPaymentId(string $paymentId): self
21
    {
22
        $this->paymentId = $paymentId;
23
24
        return $this;
25
    }
26
27
    public function getStatus(): ?string
28
    {
29
        return $this->status;
30
    }
31
32
    public function setStatus(string $status): self
33
    {
34
        $this->status = $status;
35
36
        return $this;
37
    }
38
39
    public function getAdditional(): ?array
40
    {
41
        return $this->additional;
42
    }
43
44
    public function setAdditional(array $additional): self
45
    {
46
        $this->additional = $additional;
47
48
        return $this;
49
    }
50
51
    /**
52
     * Get the instance as an array.
53
     *
54
     * @return array
55
     */
56
    public function toArray(): array
57
    {
58
        return [
59
            'payment_id' => $this->paymentId,
60
            'status' => $this->status,
61
            'additional' => $this->additional,
62
        ];
63
    }
64
}