FakeEntityPageBatchFetcher::fetchEntityPages()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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