Completed
Pull Request — master (#13)
by Jeroen De
03:37
created

Event   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 25
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSubject() 0 3 1
A getStartDate() 0 3 1
A getEndDate() 0 3 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace ModernTimeline;
6
7
use ModernTimeline\ResultFacade\Subject;
8
use SMWDITime;
9
10
class Event {
11
12
	private $subject;
13
	private $startDate;
14
	private $endDate;
15
16 3
	public function __construct( Subject $subject, SMWDITime $startDate, ?SMWDITime $endDate ) {
17 3
		$this->subject = $subject;
18 3
		$this->startDate = $startDate;
19 3
		$this->endDate = $endDate;
20 3
	}
21
22 3
	public function getSubject(): Subject {
23 3
		return $this->subject;
24
	}
25
26 3
	public function getStartDate(): SMWDITime {
27 3
		return $this->startDate;
28
	}
29
30 3
	public function getEndDate(): ?SMWDITime {
31 3
		return $this->endDate;
32
	}
33
34
}
35