Completed
Pull Request — master (#10)
by Tim
919:49 queued 853:50
created

BannerSelection::getBannerValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
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 BannerSelection {
11
12
	private $bannerValues = [];
13
	private $displayBanner;
14
15
	public function __construct( Visitor $bannerValues, bool $displayBanner ) {
16
		$this->displayBanner = $displayBanner;
17
		$this->bannerValues = $bannerValues;
18
	}
19
20
	public function getBannerValues(): array {
21
		return $this->bannerValues;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->bannerValues returns the type WMDE\BannerServer\UseCase\BannerSelection\Visitor which is incompatible with the type-hinted return array.
Loading history...
22
	}
23
24
	public function displayBanner(): bool {
25
		return $this->displayBanner;
26
	}
27
28
	public function getHeaders(): array {
29
		return [
30
			'Content-Type' => 'application/javascript'
31
		];
32
	}
33
}