PropertyDataValueTypeLookupException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
A getPropertyId() 0 3 1
1
<?php
2
3
namespace Wikibase\QueryEngine;
4
5
use Exception;
6
use Wikibase\DataModel\Entity\PropertyId;
7
8
/**
9
 * @since 0.4
10
 *
11
 * @licence GNU GPL v2+
12
 * @author Jeroen De Dauw < [email protected] >
13
 */
14
class PropertyDataValueTypeLookupException extends QueryEngineException {
15
16
	private $propertyId;
17
18
	public function __construct( PropertyId $propertyId, $message = null, Exception $previous = null ) {
19
		$this->propertyId = $propertyId;
20
21
		if ( $message === null ) {
22
			$message = 'Could not find the types of DataValues used on property : ' . $propertyId;
23
		}
24
25
		parent::__construct( $message, 0, $previous );
26
	}
27
28
	/**
29
	 * @return PropertyId
30
	 */
31
	public function getPropertyId() {
32
		return $this->propertyId;
33
	}
34
35
}
36