1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Scrumban\Model; |
4
|
|
|
|
5
|
|
|
abstract class UserStory implements CardInterface, EstimableInterface |
6
|
|
|
{ |
7
|
|
|
/** @var string **/ |
8
|
|
|
protected $id; |
9
|
|
|
/** @var string **/ |
10
|
|
|
protected $title; |
11
|
|
|
/** @var string **/ |
12
|
|
|
protected $description; |
13
|
|
|
/** @var int **/ |
14
|
|
|
protected $value; |
15
|
|
|
/** @var string **/ |
16
|
|
|
protected $status; |
17
|
|
|
/** @var float **/ |
18
|
|
|
protected $estimatedTime; |
19
|
|
|
/** @var float **/ |
20
|
|
|
protected $spentTime; |
21
|
|
|
/** @var Sprint **/ |
22
|
|
|
protected $sprint; |
23
|
|
|
/** @var Epic **/ |
24
|
|
|
protected $epic; |
25
|
|
|
/** @var \DateTime **/ |
26
|
|
|
protected $createdAt; |
27
|
|
|
/** @var \DateTime **/ |
28
|
|
|
protected $updatedAt; |
29
|
|
|
|
30
|
|
|
public function getCardType(): string |
31
|
|
|
{ |
32
|
|
|
return self::CARD_TYPE_US; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function setId(string $id): self |
36
|
|
|
{ |
37
|
|
|
$this->id = $id; |
38
|
|
|
|
39
|
|
|
return $this; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
public function getId(): string |
43
|
|
|
{ |
44
|
|
|
return $this->id; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
public function setTitle(string $title): self |
48
|
|
|
{ |
49
|
|
|
$this->title = $title; |
50
|
|
|
|
51
|
|
|
return $this; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
public function getTitle(): string |
55
|
|
|
{ |
56
|
|
|
return $this->title; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function setDescription(string $description): self |
60
|
|
|
{ |
61
|
|
|
$this->description = $description; |
62
|
|
|
|
63
|
|
|
return $this; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
public function getDescription(): string |
67
|
|
|
{ |
68
|
|
|
return $this->description; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
public function setValue(int $value): self |
72
|
|
|
{ |
73
|
|
|
$this->value = $value; |
74
|
|
|
|
75
|
|
|
return $this; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
public function getValue(): int |
79
|
|
|
{ |
80
|
|
|
return $this->value; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
public function setStatus(string $status): CardInterface |
84
|
|
|
{ |
85
|
|
|
$this->status = $status; |
86
|
|
|
|
87
|
|
|
return $this; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
public function getStatus(): string |
91
|
|
|
{ |
92
|
|
|
return $this->status; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
public function setEstimatedTime(float $estimatedTime): EstimableInterface |
96
|
|
|
{ |
97
|
|
|
$this->estimatedTime = $estimatedTime; |
98
|
|
|
|
99
|
|
|
return $this; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
public function getEstimatedTime(): float |
103
|
|
|
{ |
104
|
|
|
return $this->estimatedTime; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
public function setSpentTime(float $spentTime): EstimableInterface |
108
|
|
|
{ |
109
|
|
|
$this->spentTime = $spentTime; |
110
|
|
|
|
111
|
|
|
return $this; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
public function getSpentTime(): float |
115
|
|
|
{ |
116
|
|
|
return $this->spentTime; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
public function setSprint(Sprint $sprint): self |
120
|
|
|
{ |
121
|
|
|
$this->sprint = $sprint; |
122
|
|
|
|
123
|
|
|
return $this; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
public function getSprint(): ?Sprint |
127
|
|
|
{ |
128
|
|
|
return $this->sprint; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
public function setEpic(Epic $epic): self |
132
|
|
|
{ |
133
|
|
|
$this->epic = $epic; |
134
|
|
|
|
135
|
|
|
return $this; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
public function getEpic(): ?Epic |
139
|
|
|
{ |
140
|
|
|
return $this->epic; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
public function setCreatedAt(\DateTime $createdAt): self |
144
|
|
|
{ |
145
|
|
|
$this->createdAt = $createdAt; |
146
|
|
|
|
147
|
|
|
return $this; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
public function getCreatedAt(): \DateTime |
151
|
|
|
{ |
152
|
|
|
return $this->createdAt; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
public function setUpdatedAt(\DateTime $updatedAt): self |
156
|
|
|
{ |
157
|
|
|
$this->updatedAt = $updatedAt; |
158
|
|
|
|
159
|
|
|
return $this; |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
public function getUpdatedAt(): \DateTime |
163
|
|
|
{ |
164
|
|
|
return $this->updatedAt; |
165
|
|
|
} |
166
|
|
|
} |