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

Visitor   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 22
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTotalImpressionCount() 0 2 1
A getBucketIdentifier() 0 2 1
A __construct() 0 4 1
A hasDonated() 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 Visitor {
11
12
	private $totalImpressionCount = 0;
13
	private $bucketIdentifier;
14
	private $hasDonated;
15
16 2
	public function __construct( int $totalImpressionCount, ?string $bucketIdentifier, bool $hasDonated ) {
17 2
		$this->totalImpressionCount = $totalImpressionCount;
18 2
		$this->bucketIdentifier = $bucketIdentifier;
19 2
		$this->hasDonated = $hasDonated;
20 2
	}
21
22 2
	public function getTotalImpressionCount(): int {
23 2
		return $this->totalImpressionCount;
24
	}
25
26 2
	public function getBucketIdentifier(): ?string {
27 2
		return $this->bucketIdentifier;
28
	}
29
30 2
	public function hasDonated(): bool {
31 2
		return $this->hasDonated;
32
	}
33
}