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.

Payment::addTransaction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Onend\PayPal\Payment\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
use Onend\PayPal\Common\Enum\Intent;
8
use Onend\PayPal\Common\Model\AbstractModel;
9
10
class Payment extends AbstractModel
11
{
12
    /**
13
     * @JMS\Type("string")
14
     *
15
     * @var string
16
     */
17
    protected $id;
18
19
    /**
20
     * @JMS\Type("string")
21
     * @JMS\SerializedName("create_time")
22
     *
23
     * @var string
24
     */
25
    protected $createTime;
26
27
    /**
28
     * @JMS\Type("string")
29
     * @JMS\SerializedName("update_time")
30
     *
31
     * @var string
32
     */
33
    protected $updateTime;
34
35
    /**
36
     * @JMS\Type("string")
37
     *
38
     * @var string
39
     */
40
    protected $intent;
41
42
    /**
43
     * @JMS\Type("Onend\PayPal\Payment\Model\Payer")
44
     *
45
     * @var Payer
46
     */
47
    protected $payer;
48
49
    /**
50
     * @JMS\Type("array<Onend\PayPal\Payment\Model\Transaction>")
51
     *
52
     * @var Transaction[]
53
     */
54
    protected $transactions;
55
56
    /**
57
     * @JMS\Type("Onend\PayPal\Payment\Model\RedirectUrl")
58
     * @JMS\SerializedName("redirect_urls")
59
     *
60
     * @var RedirectUrl
61
     */
62
    protected $redirectUrls;
63
64
    /**
65
     * @return string
66
     */
67
    public function getId()
68
    {
69
        return $this->id;
70
    }
71
72
    /**
73
     * @param string $id
74
     */
75
    public function setId($id)
76
    {
77
        $this->id = $id;
78
    }
79
80
    /**
81
     * @return string
82
     */
83
    public function getCreateTime()
84
    {
85
        return $this->createTime;
86
    }
87
88
    /**
89
     * @param string $createTime
90
     */
91
    public function setCreateTime($createTime)
92
    {
93
        $this->createTime = $createTime;
94
    }
95
96
    /**
97
     * @return string
98
     */
99
    public function getUpdateTime()
100
    {
101
        return $this->updateTime;
102
    }
103
104
    /**
105
     * @param string $updateTime
106
     */
107
    public function setUpdateTime($updateTime)
108
    {
109
        $this->updateTime = $updateTime;
110
    }
111
112
    /**
113
     * @return string
114
     */
115
    public function getIntent()
116
    {
117
        return $this->intent;
118
    }
119
120
    /**
121
     * @param string $intent
122
     * @throws \InvalidArgumentException
123
     */
124
    public function setIntent($intent)
125
    {
126
        Intent::checkValue($intent);
127
        $this->intent = $intent;
128
    }
129
130
    /**
131
     * @return Payer
132
     */
133
    public function getPayer()
134
    {
135
        return $this->payer;
136
    }
137
138
    /**
139
     * @param Payer $payer
140
     */
141
    public function setPayer(Payer $payer)
142
    {
143
        $this->payer = $payer;
144
    }
145
146
    /**
147
     * @return Transaction[]
148
     */
149
    public function getTransactions()
150
    {
151
        return $this->transactions;
152
    }
153
154
    /**
155
     * @param Transaction[] $transactions
156
     */
157
    public function setTransactions(array $transactions)
158
    {
159
        foreach ($transactions as $transaction) {
160
            $this->addTransaction($transaction);
161
        }
162
    }
163
164
    /**
165
     * @param Transaction $transaction
166
     */
167
    public function addTransaction(Transaction $transaction)
168
    {
169
        $this->transactions[] = $transaction;
170
    }
171
172
    /**
173
     * @return RedirectUrl
174
     */
175
    public function getRedirectUrls()
176
    {
177
        return $this->redirectUrls;
178
    }
179
180
    /**
181
     * @param RedirectUrl $redirectUrl
182
     */
183
    public function setRedirectUrls(RedirectUrl $redirectUrl)
184
    {
185
        $this->redirectUrls = $redirectUrl;
186
    }
187
}
188