Completed
Push — main ( b55b92...e8d442 )
by
unknown
05:41
created

ItemApiLookup   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Addwiki\Wikibase\Api\Lookup;
4
5
use Wikibase\DataModel\Entity\EntityDocument;
6
use Wikibase\DataModel\Entity\ItemId;
7
use Wikibase\DataModel\Services\Lookup\EntityLookup;
8
use Wikibase\DataModel\Services\Lookup\ItemLookup;
9
10
/**
11
 * @access private
12
 *
13
 * @author Thomas Pellissier Tanon
14
 * @author Addshore
15
 */
16
class ItemApiLookup implements ItemLookup {
17
18
	private \Wikibase\DataModel\Services\Lookup\EntityLookup $entityLookup;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_NS_SEPARATOR, expecting T_FUNCTION or T_CONST
Loading history...
19
20
	/**
21
	 * @param EntityLookup $entityLookup
22
	 */
23
	public function __construct( EntityLookup $entityLookup ) {
24
		$this->entityLookup = $entityLookup;
25
	}
26
27
	/**
28
	 * @see ItemLookup::getItemForId
29
	 * @return EntityDocument|null
30
	 */
31
	public function getItemForId( ItemId $itemId ) {
32
		return $this->entityLookup->getEntity( $itemId );
33
	}
34
}
35