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

GanttSection   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 82.14%

Importance

Changes 0
Metric Value
wmc 11
lcom 1
cbo 0
dl 0
loc 53
ccs 23
cts 28
cp 0.8214
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A setTasks() 0 3 1
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 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 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
}