Passed
Push — master ( 7d7cf1...424d8c )
by Gabriel
37s queued 10s
created

ActiveBannerSelectionData   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 26
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCampaignEnd() 0 2 1
A getBannerIdentifier() 0 2 1
A getVisitorData() 0 2 1
A __construct() 0 4 1
A displayBanner() 0 2 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\BannerServer\UseCase\BannerSelection;
6
7
/**
8
 * @license GNU GPL v2+
9
 */
10
class ActiveBannerSelectionData implements BannerSelectionData {
11
12
	private $bannerIdentifier;
13
	private $visitorData;
14
	private $campaignEnd;
15
16 1
	public function __construct( Visitor $visitorData, string $bannerIdentifier, \DateTime $campaignEnd ) {
17 1
		$this->visitorData = $visitorData;
18 1
		$this->bannerIdentifier = $bannerIdentifier;
19 1
		$this->campaignEnd = $campaignEnd;
20 1
	}
21
22 1
	public function displayBanner(): bool {
23 1
		return true;
24
	}
25
26 1
	public function getVisitorData(): Visitor {
27 1
		return $this->visitorData;
28
	}
29
30 1
	public function getBannerIdentifier(): string {
31 1
		return $this->bannerIdentifier;
32
	}
33
34 1
	public function getCampaignEnd(): \DateTime {
35 1
		return $this->campaignEnd;
36
	}
37
}