FakeEntityPageBatchFetcher   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 0
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A fetchEntityPages() 0 3 1
1
<?php
2
3
namespace Tests\Queryr\Replicator\Fixtures;
4
5
use Queryr\Replicator\EntitySource\EntityPageBatchFetcher;
6
use Queryr\Replicator\Model\EntityPage;
7
8
class FakeEntityPageBatchFetcher implements EntityPageBatchFetcher {
9
10
	private $idsToIgnore;
11
12
	public function __construct( array $idsToIgnore = [] ) {
13
		$this->idsToIgnore = $idsToIgnore;
14
	}
15
16
	/**
17
	 * @param string[] $entityIds
18
	 *
19
	 * @return EntityPage[]
20
	 */
21
	public function fetchEntityPages( array $entityIds ): array {
22
		return array_diff( $entityIds, $this->idsToIgnore );
23
	}
24
25
}
26