ImpressionThreshold   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A isThresholdReached() 0 2 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\BannerServer\Entity\BannerSelection;
6
7
/**
8
 * @license GPL-2.0-or-later
9
 */
10
class ImpressionThreshold {
11
12 1
	public function __construct(
13
		private readonly int $seasonalLimit
14
	) {
15 1
	}
16
17 1
	public function isThresholdReached( int $impressions ): bool {
18 1
		return $impressions >= $this->seasonalLimit;
19
	}
20
}
21