Completed
Push — master ( 17f60e...660cd0 )
by Francesco
05:55
created

Segment::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Audiens\AppnexusClient\entity;
4
5
/**
6
 * Class Segment
7
 */
8
class Segment
9
{
10
11
    /** @var  int */
12
    protected $id;
13
14
    /** @var  bool */
15
    protected $active = true;
16
17
    /** @var  string */
18
    protected $description;
19
20
    /** @var  int */
21
    protected $member_id;
22
23
    /** @var  string */
24
    protected $code;
25
26
    /** @var  string */
27
    protected $provider;
28
29
    /** @var  float */
30
    protected $price;
31
32
    /** @var  string */
33
    protected $short_name;
34
35
    /** @var  int */
36
    protected $expire_minutes;
37
38
    /** @var  string */
39
    protected $category;
40
41
    /** @var  \Datetime */
42
    protected $last_activity;
43
44
    /** @var  bool */
45
    protected $enable_rm_piggy_back;
46
47
    /**
48
     * Segment constructor
49
     */
50
    public function __construct()
51
    {
52
        $this->active = true;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 9 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
53
        $this->last_activity = new \DateTime();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
54
        $this->price = 0.0;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
55
        $this->provider = 'base-provider';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
56
        $this->expire_minutes = 2147483647;
57
    }
58
59
60
    /**
61
     * @return int
62
     */
63
    public function getId()
64
    {
65
        return $this->id;
66
    }
67
68
    /**
69
     * @param int $id
70
     */
71
    public function setId($id)
72
    {
73
        $this->id = $id;
74
    }
75
76
    /**
77
     * @return boolean
78
     */
79
    public function isActive()
80
    {
81
        return $this->active;
82
    }
83
84
    /**
85
     * @param boolean $active
86
     */
87
    public function setActive($active)
88
    {
89
        $this->active = $active;
90
    }
91
92
    /**
93
     * @return string
94
     */
95
    public function getDescription()
96
    {
97
        return $this->description;
98
    }
99
100
    /**
101
     * @param string $description
102
     */
103
    public function setDescription($description)
104
    {
105
        $this->description = $description;
106
    }
107
108
    /**
109
     * @return int
110
     */
111
    public function getMemberId()
112
    {
113
        return $this->member_id;
114
    }
115
116
    /**
117
     * @param int $memberId
118
     */
119
    public function setMemberId($memberId)
120
    {
121
        $this->member_id = $memberId;
122
    }
123
124
    /**
125
     * @return string
126
     */
127
    public function getCode()
128
    {
129
        return $this->code;
130
    }
131
132
    /**
133
     * @param string $code
134
     */
135
    public function setCode($code)
136
    {
137
        $this->code = $code;
138
    }
139
140
    /**
141
     * @return string
142
     */
143
    public function getProvider()
144
    {
145
        return $this->provider;
146
    }
147
148
    /**
149
     * @param string $provider
150
     */
151
    public function setProvider($provider)
152
    {
153
        $this->provider = $provider;
154
    }
155
156
    /**
157
     * @return float
158
     */
159
    public function getPrice()
160
    {
161
        return $this->price;
162
    }
163
164
    /**
165
     * @param float $price
166
     */
167
    public function setPrice($price)
168
    {
169
        $this->price = $price;
170
    }
171
172
    /**
173
     * @return string
174
     */
175
    public function getName()
176
    {
177
        return $this->short_name;
178
    }
179
180
    /**
181
     * @param string $name
182
     */
183
    public function setName($name)
184
    {
185
        $this->short_name = $name;
186
    }
187
188
    /**
189
     * @return int
190
     */
191
    public function getExpireMinutes()
192
    {
193
        return $this->expire_minutes;
194
    }
195
196
    /**
197
     * @param int $expireMinutes
198
     */
199
    public function setExpireMinutes($expireMinutes)
200
    {
201
        $this->expire_minutes = $expireMinutes;
202
    }
203
204
    /**
205
     * @return string
206
     */
207
    public function getCategory()
208
    {
209
        return $this->category;
210
    }
211
212
    /**
213
     * @param string $category
214
     */
215
    public function setCategory($category)
216
    {
217
        $this->category = $category;
218
    }
219
220
    /**
221
     * @return \Datetime
222
     */
223
    public function getLastActivity()
224
    {
225
        return $this->last_activity;
226
    }
227
228
    /**
229
     * @param \Datetime $lastActivity
230
     */
231
    public function setLastActivity(\Datetime $lastActivity)
232
    {
233
        $this->last_activity = $lastActivity;
234
    }
235
236
    /**
237
     * @return boolean
238
     */
239
    public function isEnableRmPiggyback()
240
    {
241
        return $this->enable_rm_piggy_back;
242
    }
243
244
    /**
245
     * @param boolean $enableRmPiggyback
246
     */
247
    public function setEnableRmPiggyback($enableRmPiggyback)
248
    {
249
        $this->enable_rm_piggy_back = $enableRmPiggyback;
250
    }
251
252
}
253
254