Total Complexity | 8 |
Total Lines | 86 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class Sprint implements \JsonSerializable |
||
14 | { |
||
15 | use ClassSerialize; |
||
16 | |||
17 | /** |
||
18 | * return only if Project query by key(not id). |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | public $expand; |
||
23 | |||
24 | /* @var string */ |
||
25 | public $self; |
||
26 | |||
27 | /* @var string */ |
||
28 | public $id; |
||
29 | |||
30 | /* @var string*/ |
||
31 | public $name; |
||
32 | |||
33 | /* @var string */ |
||
34 | //public $type; |
||
35 | |||
36 | /* @var string */ |
||
37 | public $state; |
||
38 | |||
39 | /* @var DateTime */ |
||
|
|||
40 | public $startDate; |
||
41 | |||
42 | /* @var DateTime */ |
||
43 | public $endDate; |
||
44 | |||
45 | /* @var string */ |
||
46 | public $originBoardId; |
||
47 | |||
48 | /* @var string */ |
||
49 | public $goal; |
||
50 | |||
51 | /* @var string */ |
||
52 | public $estimatedVelocity = null; |
||
53 | |||
54 | /* @var string */ |
||
55 | public $completedVelocity = null; |
||
56 | |||
57 | // public function __construct() { |
||
58 | // $this->startDate = new \DateTime(); |
||
59 | // $this->endDate = new \DateTime(); |
||
60 | // } |
||
61 | |||
62 | public function jsonSerialize() |
||
65 | } |
||
66 | |||
67 | public function setName($sprintName) |
||
68 | { |
||
69 | $this->name = $sprintName; |
||
70 | |||
71 | return $sprintName; |
||
72 | } |
||
73 | |||
74 | public function getName() |
||
77 | } |
||
78 | |||
79 | public function getGoal() |
||
80 | { |
||
81 | return str_replace(["\n\r", "\n", "\r"], '', $this->goal); |
||
82 | } |
||
83 | |||
84 | public function getStartDate($format = 'Y-m-d H:i:s') |
||
85 | { |
||
86 | if (!is_null($this->startDate)) { |
||
87 | $date = new \DateTime($this->startDate); |
||
88 | |||
89 | return date_format($date, $format); |
||
90 | } |
||
91 | } |
||
92 | |||
93 | public function getEndDate($format = 'Y-m-d H:i:s') |
||
99 | } |
||
100 | } |
||
101 | } |
||
102 |