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

Subject   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 28
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getWikiPage() 0 3 1
A getPropertyValueCollections() 0 3 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace ModernTimeline\ResultFacade;
6
7
use SMW\DIWikiPage;
8
9
/**
10
 * Data from a single subject (page or subobject)
11
 */
12
class Subject {
13
14
	private $wikiPage;
15
	private $propertyValueCollections;
16
17
	/**
18
	 * @param DIWikiPage $wikiPage
19
	 * @param PropertyValueCollection[] $propertyValueCollections
20
	 */
21 3
	public function __construct( DIWikiPage $wikiPage, array $propertyValueCollections ) {
22 3
		$this->wikiPage = $wikiPage;
23 3
		$this->propertyValueCollections = $propertyValueCollections;
24 3
	}
25
26 3
	public function getWikiPage(): DIWikiPage {
27 3
		return $this->wikiPage;
28
	}
29
30
	/**
31
	 * @return PropertyValueCollection[]
32
	 */
33 3
	public function getPropertyValueCollections(): array {
34 3
		return $this->propertyValueCollections;
35
	}
36
37
38
39
}