Completed
Push — master ( 9938cc...c89574 )
by no
02:51
created

CustomEntityId::unserialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Wikibase\DataModel\Fixtures;
4
5
use Wikibase\DataModel\Entity\EntityId;
6
7
/**
8
 * Dummy custom EntityId implementation for use with EntityIdValueTest
9
 *
10
 * @license GPL 2+
11
 * @author Daniel Kinzler
12
 */
13
class CustomEntityId extends EntityId {
14
15
	/**
16
	 * @see Serializable::serialize
17
	 *
18
	 * @return string
19
	 */
20
	public function serialize() {
21
		return $this->serialization;
22
	}
23
24
	/**
25
	 * @see Serializable::unserialize
26
	 *
27
	 * @param string $serialized
28
	 */
29
	public function unserialize( $serialized ) {
30
		$this->serialization = $serialized;
31
	}
32
33
	/**
34
	 * @return string
35
	 */
36
	public function getEntityType() {
37
		return 'custom';
38
	}
39
40
}
41