Completed
Pull Request — master (#68)
by De Cramer
03:00
created

Record::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace eXpansion\Bundle\LocalRecords\Entity;
4
5
/**
6
 * Class Record
7
 *
8
 * @package eXpansion\Bundle\LocalRecords;
9
 * @author  oliver de Cramer <[email protected]>
10
 */
11
class Record
12
{
13
    /** @var int */
14
    protected $id;
15
16
    /** @var string */
17
    protected $mapUid;
18
19
    /** @var int */
20
    protected $playerLogin;
21
22
    /** @var int */
23
    protected $nbLaps;
24
25
    /** @var int */
26
    protected $score;
27
28
    /** @var int */
29
    protected $nbFinish;
30
31
    /** @var int */
32
    protected $avgScore;
33
34
    /** @var string */
35
    protected $checkpoints;
36
37
    /** @var  \DateTime */
38
    protected $date;
39
40
    /**
41
     * @return int
42
     */
43
    public function getId()
44
    {
45
        return $this->id;
46
    }
47
48
    /**
49
     * @param int $id
50
     */
51
    public function setId($id)
52
    {
53
        $this->id = $id;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getMapUid()
60
    {
61
        return $this->mapUid;
62
    }
63
64
    /**
65
     * @param string $mapUid
66
     */
67 3
    public function setMapUid($mapUid)
68
    {
69 3
        $this->mapUid = $mapUid;
70 3
    }
71
72
    /**
73
     * @return int
74
     */
75 23
    public function getPlayerLogin()
76
    {
77 23
        return $this->playerLogin;
78
    }
79
80
    /**
81
     * @param int $playerLogin
82
     */
83 24
    public function setPlayerLogin($playerLogin)
84
    {
85 24
        $this->playerLogin = $playerLogin;
86 24
    }
87
88
    /**
89
     * @return int
90
     */
91
    public function getNbLaps()
92
    {
93
        return $this->nbLaps;
94
    }
95
96
    /**
97
     * @param int $nbLaps
98
     */
99 3
    public function setNbLaps($nbLaps)
100
    {
101 3
        $this->nbLaps = $nbLaps;
102 3
    }
103
104
    /**
105
     * @return int
106
     */
107 23
    public function getScore()
108
    {
109 23
        return $this->score;
110
    }
111
112
    /**
113
     * @param int $score
114
     */
115 24
    public function setScore($score)
116
    {
117 24
        $this->score = $score;
118 24
    }
119
120
    /**
121
     * @return int
122
     */
123 8
    public function getNbFinish()
124
    {
125 8
        return $this->nbFinish;
126
    }
127
128
    /**
129
     * @param int $nbFinish
130
     */
131 8
    public function setNbFinish($nbFinish)
132
    {
133 8
        $this->nbFinish = $nbFinish;
134 8
    }
135
136
    /**
137
     * @return int
138
     */
139 8
    public function getAvgScore()
140
    {
141 8
        return $this->avgScore;
142
    }
143
144
    /**
145
     * @param int $avgScore
146
     */
147 8
    public function setAvgScore($avgScore)
148
    {
149 8
        $this->avgScore = $avgScore;
150 8
    }
151
152
    /**
153
     * @return string
154
     */
155
    public function getCheckpoints()
156
    {
157
        return $this->checkpoints;
158
    }
159
160
    /**
161
     * @param string $checkpoints
162
     */
163 6
    public function setCheckpoints($checkpoints)
164
    {
165 6
        $this->checkpoints = $checkpoints;
166 6
    }
167
168
    /**
169
     * Get checkpoint times
170
     *
171
     * @return int[]
172
     */
173
    public function getCheckpointTimes()
174
    {
175
        return explode(',', $this->getCheckpoints());
176
    }
177
178
    /**
179
     * Set checkpoint times.
180
     *
181
     * @param int[]
182
     */
183 6
    public function setCheckpointTimes($checkpointTimes)
184
    {
185 6
         $this->setCheckpoints(implode(',', $checkpointTimes));
186 6
    }
187
188
    /**
189
     * @return \DateTime
190
     */
191
    public function getDate()
192
    {
193
        return $this->date;
194
    }
195
196
    /**
197
     * @param \DateTime $date
198
     */
199 6
    public function setDate($date)
200
    {
201 6
        $this->date = $date;
202
    }
203
}