GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( a6423e...d08002 )
by Miguel
38s
created

Payment::getOptionalParameters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Apoca\Sibs\Brands;
4
5
use Apoca\Sibs\Contracts\PaymentInterface;
6
7
/**
8
 * Class Payment
9
 *
10
 * @package Apoca\Sibs\Brands
11
 */
12
abstract class Payment implements PaymentInterface
13
{
14
    /**
15
     * @var float
16
     */
17
    protected $amount;
18
19
    /**
20
     * @var string
21
     */
22
    protected $currency;
23
24
    /**
25
     * @var string
26
     */
27
    protected $brand;
28
29
    /**
30
     * @var array
31
     */
32
    protected $optionalParameters = [];
33
34
    /**
35
     * @var string
36
     */
37
    protected $type;
38
39
    /**
40
     * Payment constructor.
41
     *
42
     * @param float  $amount
43
     * @param string $currency
44
     * @param string $brand
45
     * @param string $type
46
     * @param array  $optionalParameters
47
     */
48
    public function __construct(float $amount, string $currency, string $brand, string $type, array $optionalParameters)
49
    {
50
        $this->setAmount($amount);
51
        $this->setCurrency($currency);
52
        $this->setBrand($brand);
53
        $this->setType($type);
54
        $this->setOptionalParameters($optionalParameters);
55
    }
56
57
    /**
58
     * @return array
59
     */
60
    public function getOptionalParameters(): array
61
    {
62
        return $this->optionalParameters;
63
    }
64
65
    /**
66
     * @param array $optionalParameters
67
     */
68
    public function setOptionalParameters(array $optionalParameters): void
69
    {
70
        $this->optionalParameters = $optionalParameters;
71
    }
72
73
    /**
74
     * @return float
75
     */
76
    public function getAmount(): float
77
    {
78
        return $this->amount;
79
    }
80
81
    /**
82
     * @param float $amount
83
     */
84
    public function setAmount(float $amount): void
85
    {
86
        $this->amount = $amount;
87
    }
88
89
    /**
90
     * @return string
91
     */
92
    public function getCurrency(): string
93
    {
94
        return $this->currency;
95
    }
96
97
    /**
98
     * @param string $currency
99
     */
100
    public function setCurrency(string $currency): void
101
    {
102
        $this->currency = $currency;
103
    }
104
105
    /**
106
     * @return string
107
     */
108
    public function getBrand(): string
109
    {
110
        return $this->brand;
111
    }
112
113
    /**
114
     * @param string $brand
115
     */
116
    public function setBrand(string $brand): void
117
    {
118
        $this->brand = $brand;
119
    }
120
121
    /**
122
     * @return string
123
     */
124
    public function getType(): string
125
    {
126
        return $this->type;
127
    }
128
129
    /**
130
     * @param string $type
131
     */
132
    public function setType(string $type): void
133
    {
134
        $this->type = $type;
135
    }
136
}
137