Completed
Push — master ( 51e0cc...3b6349 )
by GIT
04:52
created

GanttSection::setID()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * File holding the GanttSection class
4
 *
5
 * Creats Section with params
6
 *
7
 * @author Sebastian Schmid
8
 * @file
9
 * @ingroup SemanticResultFormats
10
 */
11
12
namespace SRF\Gantt;
13
14
class GanttSection {
15
16
	private $mTitle;
17
	private $mID;
18
	private $mEarliestStartDate;
19
	private $mLatestEndDate;
20
	private $mTasks = [];
21
22 1
	public function setTitle( $title ) {
23 1
		$this->mTitle = $title;
24 1
	}
25
26 1
	public function getTitle() {
27 1
		return $this->mTitle;
28
	}
29
30 1
	public function setID( $id ) {
31 1
		$this->mID = $id;
32 1
	}
33
34
	public function getID() {
35
		return $this->mID;
36
	}
37
38 1
	public function setEarliestStartDate( $earliestStartDate ) {
39 1
		$this->mEarliestStartDate = $earliestStartDate;
40 1
	}
41
42 1
	public function getEarliestStartDate() {
43 1
		return $this->mEarliestStartDate;
44
	}
45
46 1
	public function setLatestEndDate( $latestEndDate ) {
47 1
		$this->mLatestEndDate = $latestEndDate;
48 1
	}
49
50 1
	public function getLatestEndDate() {
51 1
		return $this->mLatestEndDate;
52
	}
53
54 1
	public function getTasks() {
55 1
		return $this->mTasks;
56
	}
57
58
	// If we reorder the tasks we need to reset it with the ordered tasks
59
	public function setTasks( $tasks ) {
60
		$this->mTasks = $tasks;
61
	}
62
63 1
	public function addTask( $task ) {
64 1
		$this->mTasks[] = $task;
65
	}
66
}