Completed
Push — master ( 6dc7d8...407c40 )
by Karsten
15:45
created

GanttSection   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 11
lcom 1
cbo 0
dl 0
loc 53
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A setTitle() 0 3 1
A getTitle() 0 3 1
A setID() 0 3 1
A getID() 0 3 1
A setEarliestStartDate() 0 3 1
A getEarliestStartDate() 0 3 1
A setLatestEndDate() 0 3 1
A getLatestEndDate() 0 3 1
A getTasks() 0 3 1
A setTasks() 0 3 1
A addTask() 0 3 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
	public function setTitle( $title ) {
23
		$this->mTitle = $title;
24
	}
25
26
	public function getTitle() {
27
		return $this->mTitle;
28
	}
29
30
	public function setID( $id ) {
31
		$this->mID = $id;
32
	}
33
34
	public function getID() {
35
		return $this->mID;
36
	}
37
38
	public function setEarliestStartDate( $earliestStartDate ) {
39
		$this->mEarliestStartDate = $earliestStartDate;
40
	}
41
42
	public function getEarliestStartDate() {
43
		return $this->mEarliestStartDate;
44
	}
45
46
	public function setLatestEndDate( $latestEndDate ) {
47
		$this->mLatestEndDate = $latestEndDate;
48
	}
49
50
	public function getLatestEndDate() {
51
		return $this->mLatestEndDate;
52
	}
53
54
	public function getTasks() {
55
		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
	public function addTask( $task ) {
64
		$this->mTasks[] = $task;
65
	}
66
}