| Total Complexity | 4 |
| Total Lines | 28 |
| 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, Banner ...$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 | /** |
||
| 30 | * Returns banner for given impression count |
||
| 31 | * If impression count is over banner sequence, returns last banner in sequence |
||
| 32 | */ |
||
| 33 | public function getBanner( int $visitorImpressions ): string { |
||
| 38 | } |
||
| 39 | } |