| Total Complexity | 8 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 88.89% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Campaign { |
||
| 11 | |||
| 12 | private $identifier; |
||
| 13 | private $start; |
||
| 14 | private $end; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var Bucket[] |
||
| 18 | */ |
||
| 19 | private $buckets; |
||
| 20 | |||
| 21 | 7 | public function __construct( string $identifier, \DateTime $start, \DateTime $end, array $buckets ) { |
|
| 22 | 7 | $this->identifier = $identifier; |
|
| 23 | 7 | $this->start = $start; |
|
| 24 | 7 | $this->end = $end; |
|
| 25 | 7 | $this->buckets = $buckets; |
|
| 26 | 7 | } |
|
| 27 | |||
| 28 | 1 | public function getIdentifier(): string { |
|
| 29 | 1 | return $this->identifier; |
|
| 30 | } |
||
| 31 | |||
| 32 | public function getCampaignExpiration(): \DateTime { |
||
| 34 | } |
||
| 35 | |||
| 36 | 4 | public function isInActiveDateRange( \DateTime $time ): bool { |
|
| 39 | } |
||
| 40 | |||
| 41 | 3 | public function selectBucket( ?string $bucketId, callable $fallbackSelectionStrategy ): Bucket { |
|
| 48 | } |
||
| 49 | } |