Passed
Push — master ( 3296ef...c4c0f1 )
by Anthony
03:28
created

Version::getLastPackagistVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PiouPiou\RibsAdminBundle\Entity;
4
5
use DateTime;
6
use Doctrine\ORM\Mapping as ORM;
7
use Gedmo\Mapping\Annotation as Gedmo;
8
9
/**
10
 * Version
11
 *
12
 * @ORM\Table(name="verion", uniqueConstraints={@ORM\UniqueConstraint(name="guid_UNIQUE_version", columns={"guid"})})
13
 * @ORM\Entity
14
 * @ORM\EntityListeners({"PiouPiou\RibsAdminBundle\EventListener\GuidAwareListener", "PiouPiou\RibsAdminBundle\EventListener\CreateUpdateAwareListener"})
15
 */
16
class Version
17
{
18
    use GuidTrait;
19
    use CreatedUpdatedTrait;
20
21
    /**
22
     * @var integer
23
     *
24
     * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true})
25
     * @ORM\Id
26
     * @ORM\GeneratedValue(strategy="IDENTITY")
27
     */
28
    private $id;
29
30
    /**
31
     * @var string
32
     *
33
     * @ORM\Column(name="project_name", type="string", length=255, nullable=false)
34
     */
35
    private $project_name;
36
37
    /**
38
     * @var string
39
     *
40
     * @ORM\Column(name="package_name", type="string", length=255, nullable=false)
41
     */
42
    private $package_name;
43
44
    /**
45
     * @var string
46
     *
47
     * @ORM\Column(name="project_url", type="string", length=255, nullable=false)
48
     */
49
    private $project_url;
50
51
    /**
52
     * @var string
53
     *
54
     * @ORM\Column(name="version", type="string", length=255, nullable=true)
55
     */
56
    private $version;
57
58
    /**
59
     * @var string
60
     *
61
     * @ORM\Column(name="last_packagist_version", type="string", length=255, nullable=true)
62
     */
63
    private $last_packagist_version;
64
65
    /**
66
     * @var DateTime
67
     *
68
     * @ORM\Column(name="version_date", type="date", nullable=true)
69
     */
70
    private $version_date;
71
72
    /**
73
     * @var DateTime
74
     *
75
     * @ORM\Column(name="last_check", type="datetime", nullable=true)
76
     */
77
    private $last_check;
78
79
    /**
80
     * @var string
81
     *
82
     * @ORM\Column(name="mode", type="string", length=255, nullable=true)
83
     */
84
    private $mode;
85
	
86
	/**
87
	 * @var string
88
	 *
89
	 * @ORM\Column(name="check_version_url", type="string", length=255, nullable=false)
90
	 */
91
    private $check_version_url;
92
93
    /**
94
     * @return int
95
     */
96
    public function getId(): int
97
    {
98
        return $this->id;
99
    }
100
101
    /**
102
     * @param int $id
103
     * @return Version
104
     */
105
    public function setId(int $id): self
106
    {
107
        $this->id = $id;
108
109
        return $this;
110
    }
111
112
    /**
113
     * @return string
114
     */
115
    public function getProjectName(): ?string
116
    {
117
        return $this->project_name;
118
    }
119
120
    /**
121
     * @param string $project_name
122
     * @return Version
123
     */
124
    public function setProjectName(string $project_name): self
125
    {
126
        $this->project_name = $project_name;
127
128
        return $this;
129
    }
130
131
    /**
132
     * @return string
133
     */
134
    public function getPackageName(): ?string
135
    {
136
        return $this->package_name;
137
    }
138
139
    /**
140
     * @param string $package_name
141
     * @return Version
142
     */
143
    public function setPackageName(string $package_name): self
144
    {
145
        $this->package_name = $package_name;
146
147
        return $this;
148
    }
149
150
    /**
151
     * @return string
152
     */
153
    public function getProjectUrl(): ?string
154
    {
155
        return $this->project_url;
156
    }
157
158
    /**
159
     * @param string $project_url
160
     * @return Version
161
     */
162
    public function setProjectUrl(string $project_url): self
163
    {
164
        $this->project_url = $project_url;
165
166
        return $this;
167
    }
168
169
    /**
170
     * @return string
171
     */
172
    public function getVersion(): ?string
173
    {
174
        return $this->version;
175
    }
176
177
    /**
178
     * @param string $version
179
     * @return Version
180
     */
181
    public function setVersion(string $version): self
182
    {
183
        $this->version = $version;
184
185
        return $this;
186
    }
187
188
    /**
189
     * @return string
190
     */
191
    public function getLastPackagistVersion(): ?string
192
    {
193
        return $this->last_packagist_version;
194
    }
195
196
    /**
197
     * @param string $last_packagist_version
198
     * @return Version
199
     */
200
    public function setLastPackagistVersion(string $last_packagist_version): self
201
    {
202
        $this->last_packagist_version = $last_packagist_version;
203
204
        return $this;
205
    }
206
207
    /**
208
     * @return DateTime
209
     */
210
    public function getVersionDate(): ?DateTime
211
    {
212
        return $this->version_date;
213
    }
214
215
    /**
216
     * @param DateTime $version_date
217
     * @return Version
218
     */
219
    public function setVersionDate(DateTime $version_date): self
220
    {
221
        $this->version_date = $version_date;
222
223
        return $this;
224
    }
225
226
    /**
227
     * @return DateTime
228
     */
229
    public function getLastCheck(): ?DateTime
230
    {
231
        return $this->last_check;
232
    }
233
234
    /**
235
     * @param DateTime $last_check
236
     * @return Version
237
     */
238
    public function setLastCheck(DateTime $last_check): self
239
    {
240
        $this->last_check = $last_check;
241
242
        return $this;
243
    }
244
245
    /**
246
     * @return string
247
     */
248
    public function getMode(): ?string
249
    {
250
        return $this->mode;
251
    }
252
253
    /**
254
     * @param string $mode
255
     * @return Version
256
     */
257
    public function setMode(string $mode): self
258
    {
259
        $this->mode = $mode;
260
261
        return $this;
262
    }
263
264
    /**
265
     * @return string
266
     */
267
    public function getCheckVersionUrl(): ?string
268
    {
269
        return $this->check_version_url;
270
    }
271
272
    /**
273
     * @param string $check_version_url
274
     * @return Version
275
     */
276
    public function setCheckVersionUrl(string $check_version_url): self
277
    {
278
        $this->check_version_url = $check_version_url;
279
280
        return $this;
281
    }
282
}
283
284