Completed
Push — master ( d93f11...86f8d1 )
by Jeroen De
03:37
created

EntityOfUnknownType::copy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Wikibase\DataModel\Services\Fixtures;
4
5
use Wikibase\DataModel\Entity\EntityDocument;
6
7
/**
8
 * @licence GNU GPL v2+
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
	 * @since 3.3
44
	 *
45
	 * @param mixed $target
46
	 *
47
	 * @return bool Always true.
48
	 */
49
	public function equals( $target ) {
50
		return true;
51
	}
52
53
	/**
54
	 * @see EntityDocument::copy
55
	 *
56
	 * @since 3.3
57
	 *
58
	 * @return self
59
	 */
60
	public function copy() {
61
		return $this;
62
	}
63
64
}
65