EntityOfUnknownType   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 56
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A getType() 0 3 1
A setId() 0 2 1
A isEmpty() 0 3 1
A equals() 0 3 1
A copy() 0 3 1
A clear() 0 2 1
1
<?php
2
3
namespace Wikibase\DataModel\Services\Fixtures;
4
5
use Wikibase\DataModel\Entity\EntityDocument;
6
7
/**
8
 * @license GPL-2.0-or-later
9
 * @author Jeroen De Dauw < [email protected] >
10
 */
11
class EntityOfUnknownType implements EntityDocument {
12
13
	/**
14
	 * @return null
15
	 */
16
	public function getId() {
17
		return null;
18
	}
19
20
	/**
21
	 * @return string Returns the entity type "unknown-entity-type".
22
	 */
23
	public function getType() {
24
		return 'unknown-entity-type';
25
	}
26
27
	/**
28
	 * @param mixed $id Ignored.
29
	 */
30
	public function setId( $id ) {
31
	}
32
33
	/**
34
	 * @return bool Always true.
35
	 */
36
	public function isEmpty() {
37
		return true;
38
	}
39
40
	/**
41
	 * @see EntityDocument::equals
42
	 *
43
	 * @param mixed $target
44
	 *
45
	 * @return bool Always true.
46
	 */
47
	public function equals( $target ) {
48
		return true;
49
	}
50
51
	/**
52
	 * @see EntityDocument::copy
53
	 *
54
	 * @return self
55
	 */
56
	public function copy() {
57
		return $this;
58
	}
59
60
	/**
61
	 * @see EntityDocument::clear
62
	 */
63
	public function clear() {
64
	}
65
66
}
67