ResourceNode::getType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
nc 1
cc 1
eloc 2
nop 0
crap 2
1
<?php
2
3
namespace PPP\DataModel;
4
5
/**
6
 * A resource node.
7
 *
8
 * @licence AGPLv3+
9
 * @author Thomas Pellissier Tanon
10
 */
11
abstract class ResourceNode {
12
13
	/**
14
	 * @var string
15
	 */
16
	private $value;
17
18
	/**
19
	 * @param string $value
20
	 */
21
	public function __construct($value) {
22
		$this->value = $value;
23
	}
24
25
	/**
26
	 * @return string
27
	 */
28
	public function getValue() {
29
		return $this->value;
30
	}
31
32
	/**
33
	 * @return string
34
	 */
35
	public abstract function getValueType();
36
37
	/**
38
	 * @return string
39
	 */
40
	public function getType() {
41
		return 'resource';
42
	}
43
44
	/**
45
	 * Returns if $target is equals to the current resource
46
	 *
47
	 * @param mixed $target
48
	 * @return boolean
49
	 */
50
	public abstract function equals($target);
51
}
52