ResourceNode   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 41
c 0
b 0
f 0
ccs 0
cts 7
cp 0
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getValue() 0 3 1
getValueType() 0 1 ?
A getType() 0 3 1
equals() 0 1 ?
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