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

EmptyBannerSelectionData::getVisitorData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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 EmptyBannerSelectionData implements BannerSelectionData {
11
12
	private $visitorData;
13
14 3
	public function __construct( Visitor $visitorData ) {
15 3
		$this->visitorData = $visitorData;
16 3
	}
17
18 1
	public function displayBanner(): bool {
19 1
		return false;
20
	}
21
22 1
	public function getVisitorData(): Visitor {
23 1
		return $this->visitorData;
24
	}
25
26 1
	public function getBannerIdentifier(): string {
27 1
		throw new \LogicException( 'Empty banner selection does not contain banner data.' );
28
	}
29
30 1
	public function getCampaignEnd(): \DateTime {
31 1
		throw new \LogicException( 'Empty banner selection does not contain campaign data.' );
32
	}
33
}