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::setSubscriptionId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 6
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Speicher210\Monsum\Api\Service\Subscription\Cancel;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Monsum\Api\AbstractRequestData;
7
8
/**
9
 * The request data for cancellation of a subscription.
10
 */
11 View Code Duplication
final class RequestData extends AbstractRequestData
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * The subscription ID.
15
     *
16
     * @var integer
17
     *
18
     * @JMS\Type("integer")
19
     * @JMS\SerializedName("SUBSCRIPTION_ID")
20
     */
21
    protected $subscriptionId;
22
23
    /**
24
     *  The subscription cancellation date.
25
     *
26
     * @var \DateTime
27
     *
28
     * @JMS\Type("DateTime<'Y-m-d H:i:s'>")
29
     * @JMS\SerializedName("cancellation_date")
30
     */
31
    protected $cancellationDate;
32
33
    /**
34
     * The reason for cancellation of a subscription.
35
     *
36
     * @var string
37
     *
38
     * @JMS\Type("string")
39
     * @JMS\SerializedName("CANCELLATION_NOTE")
40
     */
41
    protected $cancellationNote;
42
43
    /**
44
     * Constructor.
45
     *
46
     * @param integer $subscriptionId The subscription ID.
47
     */
48 3
    public function __construct($subscriptionId)
49
    {
50 3
        $this->setSubscriptionId($subscriptionId);
51 3
    }
52
53
    /**
54
     * Get the subscription ID.
55
     *
56
     * @return integer
57
     */
58
    public function getSubscriptionId()
59
    {
60
        return $this->subscriptionId;
61
    }
62
63
    /**
64
     * Set the subscription ID.
65
     *
66
     * @param integer $subscriptionId The subscription ID.
67
     * @return RequestData
68
     */
69 3
    public function setSubscriptionId($subscriptionId)
70
    {
71 3
        $this->subscriptionId = $subscriptionId;
72
73 3
        return $this;
74
    }
75
76
    /**
77
     * Get the cancellation date and time.
78
     *
79
     * @return \DateTime
80
     */
81
    public function getCancellationDate()
82
    {
83
        return $this->cancellationDate;
84
    }
85
86
    /**
87
     * Set the cancellation date and time.
88
     *
89
     * @param \DateTime $cancellationDate The cancellation date and time.
90
     * @return RequestData
91
     */
92 3
    public function setCancellationDate(\DateTime $cancellationDate = null)
93
    {
94 3
        $this->cancellationDate = $cancellationDate;
95
96 3
        return $this;
97
    }
98
99
    /**
100
     * Get the cancellation note.
101
     *
102
     * @return string
103
     */
104
    public function getCancellationNote()
105
    {
106
        return $this->cancellationNote;
107
    }
108
109
    /**
110
     * Set the cancellation note.
111
     *
112
     * @param string $cancellationNote The cancellation note.
113
     * @return RequestData
114
     */
115 3
    public function setCancellationNote($cancellationNote)
116
    {
117 3
        $this->cancellationNote = $cancellationNote;
118
119 3
        return $this;
120
    }
121
}
122