| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Bucket { |
||
| 11 | |||
| 12 | private $identifier; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Banner[] |
||
| 16 | */ |
||
| 17 | private $banners = []; |
||
| 18 | |||
| 19 | public function __construct( string $identifier, Banner $mainBanner, array $otherBanners ) { |
||
| 20 | $this->identifier = $identifier; |
||
| 21 | $this->banners[] = $mainBanner; |
||
| 22 | array_push( $this->banners, ...$otherBanners ); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getIdentifier(): string { |
||
| 27 | } |
||
| 28 | |||
| 29 | private function getLastBanner(): Banner { |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Decides which banner to return based on visitor's impression count |
||
| 35 | */ |
||
| 36 | public function getBanner( int $visitorImpressionCount ): string { |
||
| 41 | } |
||
| 42 | } |