ActiveBannerSelectionData::getVisitorData()   A
last analyzed

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
use WMDE\BannerServer\Entity\Visitor;
8
9
/**
10
 * @license GPL-2.0-or-later
11
 */
12
class ActiveBannerSelectionData implements BannerSelectionData {
13
14 1
	public function __construct(
15
		private readonly Visitor $visitorData,
16
		private readonly string $bannerIdentifier,
17
		private readonly \DateTime $campaignEnd
18
	) {
19 1
	}
20
21 1
	public function displayBanner(): bool {
22 1
		return true;
23
	}
24
25 1
	public function getVisitorData(): Visitor {
26 1
		return $this->visitorData;
27
	}
28
29 1
	public function getBannerIdentifier(): string {
30 1
		return $this->bannerIdentifier;
31
	}
32
33 1
	public function getCampaignEnd(): \DateTime {
34 1
		return $this->campaignEnd;
35
	}
36
}
37