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.

TransactionInfo   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 148
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 0
dl 148
loc 148
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getAmount() 4 4 1
A setAmount() 5 5 1
A getTimeStamp() 4 4 1
A setTimeStamp() 5 5 1
A getTransactionText() 4 4 1
A setTransactionText() 5 5 1
A getStatus() 4 4 1
A setStatus() 5 5 1
A getTransactionId() 4 4 1
A setTransactionId() 5 5 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace zaporylie\Vipps\Model\Payment;
4
5
use JMS\Serializer\Annotation as Serializer;
6
7
/**
8
 * Class TransactionInfo
9
 *
10
 * @package Vipps\Model\Payment
11
 */
12 View Code Duplication
class TransactionInfo
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...
13
{
14
15
    /**
16
     * @var int
17
     * @Serializer\Type("integer")
18
     */
19
    protected $amount;
20
21
    /**
22
     * @var string
23
     * @Serializer\Type("string")
24
     */
25
    protected $status;
26
27
    /**
28
     * @var string
29
     * @Serializer\Type("string")
30
     */
31
    protected $transactionId;
32
33
    /**
34
     * @var \DateTimeInterface
35
     * @Serializer\Type("DateTime<'Y-m-d\TH:i:s.u\Z'>")
36
     */
37
    protected $timeStamp;
38
39
    /**
40
     * @var string
41
     * @Serializer\Type("string")
42
     */
43
    protected $transactionText;
44
45
    /**
46
     * Gets amount value.
47
     *
48
     * @return int
49
     */
50
    public function getAmount()
51
    {
52
        return $this->amount;
53
    }
54
55
    /**
56
     * Sets amount variable.
57
     *
58
     * @param int $amount
59
     *
60
     * @return $this
61
     */
62
    public function setAmount($amount)
63
    {
64
        $this->amount = $amount;
65
        return $this;
66
    }
67
68
    /**
69
     * Gets timeStamp value.
70
     *
71
     * @return \DateTimeInterface
72
     */
73
    public function getTimeStamp()
74
    {
75
        return $this->timeStamp;
76
    }
77
78
    /**
79
     * Sets timeStamp variable.
80
     *
81
     * @param \DateTimeInterface $timeStamp
82
     *
83
     * @return $this
84
     */
85
    public function setTimeStamp($timeStamp)
86
    {
87
        $this->timeStamp = $timeStamp;
88
        return $this;
89
    }
90
91
    /**
92
     * Gets message value.
93
     *
94
     * @return string
95
     */
96
    public function getTransactionText()
97
    {
98
        return $this->transactionText;
99
    }
100
101
    /**
102
     * Sets message variable.
103
     *
104
     * @param string $message
105
     *
106
     * @return $this
107
     */
108
    public function setTransactionText($message)
109
    {
110
        $this->transactionText = $message;
111
        return $this;
112
    }
113
114
    /**
115
     * Gets status value.
116
     *
117
     * @return string
118
     */
119
    public function getStatus()
120
    {
121
        return $this->status;
122
    }
123
124
    /**
125
     * Sets status variable.
126
     *
127
     * @param string $status
128
     *
129
     * @return $this
130
     */
131
    public function setStatus($status)
132
    {
133
        $this->status = $status;
134
        return $this;
135
    }
136
137
    /**
138
     * Gets transactionId value.
139
     *
140
     * @return string
141
     */
142
    public function getTransactionId()
143
    {
144
        return $this->transactionId;
145
    }
146
147
    /**
148
     * Sets transactionId variable.
149
     *
150
     * @param string $transactionId
151
     *
152
     * @return $this
153
     */
154
    public function setTransactionId($transactionId)
155
    {
156
        $this->transactionId = $transactionId;
157
        return $this;
158
    }
159
}
160