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

BannerSelectionUseCase::__construct()   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 1
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
use WMDE\BannerServer\Entity\BannerSelection\CampaignCollection;
0 ignored issues
show
Bug introduced by
The type WMDE\BannerServer\Entity...tion\CampaignCollection was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
/**
10
 * @license GNU GPL v2+
11
 */
12
class BannerSelectionUseCase {
13
14
	private $campaignCollection;
15
16
	public function __construct( CampaignCollection $campaignCollection ) {
17
		$this->campaignCollection = $campaignCollection;
18
	}
19
20
	public function provideBannerRequest( Visitor $visitor ): BannerSelection {
0 ignored issues
show
Unused Code introduced by
The parameter $visitor is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

20
	public function provideBannerRequest( /** @scrutinizer ignore-unused */ Visitor $visitor ): BannerSelection {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
		return new BannerSelection(
22
			new Visitor( 1, 'Testbucket', false ),
23
			true
24
		);
25
	}
26
}