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.

RequestData::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Speicher210\Monsum\Api\Service\Subscription\Update;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Monsum\Api\AbstractRequestData;
7
use Speicher210\Monsum\Api\Model\Feature;
8
9
/**
10
 * The request data for updating a subscription.
11
 */
12
final class RequestData extends AbstractRequestData
13
{
14
    /**
15
     * The subscription ID.
16
     *
17
     * @var integer
18
     *
19
     * @JMS\Type("integer")
20
     * @JMS\SerializedName("SUBSCRIPTION_ID")
21
     */
22
    protected $subscriptionId;
23
24
    /**
25
     *  The subscription next event.
26
     *
27
     * @var \DateTime
28
     *
29
     * @JMS\Type("DateTime<'Y-m-d H:i:s'>")
30
     * @JMS\SerializedName("NEXT_EVENT")
31
     */
32
    protected $nextEvent;
33
34
    /**
35
     * The external subscription ID.
36
     *
37
     * @var string
38
     *
39
     * @JMS\Type("string")
40
     * @JMS\SerializedName("SUBSCRIPTION_EXT_UID")
41
     */
42
    protected $subscriptionExternalId;
43
44
    /**
45
     * The subscription status.
46
     *
47
     * @var string
48
     *
49
     * @JMS\Type("string")
50
     * @JMS\SerializedName("STATUS")
51
     */
52
    protected $status;
53
54
    /**
55
     * The subscription X-Attribute.
56
     *
57
     * @var array
58
     *
59
     * @JMS\Type("array")
60
     * @JMS\SerializedName("X_ATTRIBUTES")
61
     */
62
    protected $xAttributes = [];
63
64
    /**
65
     * Product features.
66
     *
67
     * @var array
68
     *
69
     * @JMS\Type("array<Speicher210\Monsum\Api\Model\Feature>")
70
     * @JMS\SerializedName("FEATURES")
71
     */
72
    protected $features = [];
73
74
    /**
75
     * Constructor.
76
     *
77
     * @param integer $subscriptionId The subscription ID.
78
     */
79 3
    public function __construct($subscriptionId)
80
    {
81 3
        $this->setSubscriptionId($subscriptionId);
82 3
    }
83
84
    /**
85
     * Get the subscription ID of the request body.
86
     *
87
     * @return integer
88
     */
89
    public function getSubscriptionId()
90
    {
91
        return $this->subscriptionId;
92
    }
93
94
    /**
95
     * Set the subscription ID.
96
     *
97
     * @param integer $subscriptionId The subscription ID.
98
     * @return RequestData
99
     */
100 3
    public function setSubscriptionId($subscriptionId)
101
    {
102 3
        $this->subscriptionId = $subscriptionId;
103 3
104
        return $this;
105
    }
106
107
    /**
108
     * Get the next event date and time.
109
     *
110
     * @return \DateTime
111
     */
112
    public function getNextEvent()
113
    {
114
        return $this->nextEvent;
115
    }
116
117
    /**
118
     * Set the next event date and time.
119
     *
120
     * @param \DateTime $nextEvent The next event date and time.
121 3
     * @return RequestData
122
     */
123 3
    public function setNextEvent(\DateTime $nextEvent = null)
124
    {
125 3
        $this->nextEvent = $nextEvent;
126
127
        return $this;
128
    }
129
130
    /**
131
     * Get the external subscription ID.
132
     *
133
     * @return string
134
     */
135
    public function getSubscriptionExternalId()
136
    {
137
        return $this->subscriptionExternalId;
138
    }
139
140
    /**
141
     * Set the external subscription ID.
142
     *
143
     * @param string $subscriptionExternalId The external subscription ID.
144 3
     * @return RequestData
145
     */
146 3
    public function setSubscriptionExternalId($subscriptionExternalId)
147
    {
148 3
        $this->subscriptionExternalId = $subscriptionExternalId;
149
150
        return $this;
151
    }
152
153
    /**
154
     * Get the subscription status.
155
     *
156
     * @return string
157
     */
158
    public function getStatus()
159
    {
160
        return $this->status;
161
    }
162
163
    /**
164
     * Set the subscription status.
165
     *
166
     * @param string $status The subscription status.
167 3
     * @return RequestData
168
     */
169 3
    public function setStatus($status)
170
    {
171 3
        $this->status = $status;
172
173
        return $this;
174
    }
175
176
    /**
177
     * @return array
178
     */
179
    public function getXAttributes()
180
    {
181
        return $this->xAttributes;
182
    }
183
184
    /**
185
     * Set the subscription x attributes.
186
     *
187
     * @param array $xAttributes The subscription x attributes
188 3
     * @return RequestData
189
     */
190 3
    public function setXAttributes(array $xAttributes)
191
    {
192 3
        $this->xAttributes = $xAttributes;
193
194
        return $this;
195
    }
196
197
    /**
198
     * Get the features.
199
     *
200
     * @return array
201
     */
202
    public function getFeatures()
203
    {
204
        return $this->features;
205
    }
206
207
    /**
208
     * Set the features.
209
     *
210
     * @param Feature[] $features The features.
211 3
     * @return RequestData
212
     */
213 3
    public function setFeatures(array $features)
214
    {
215 3
        $this->features = $features;
216
217
        return $this;
218
    }
219
}
220