ReducerNode   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 28
c 0
b 0
f 0
ccs 0
cts 7
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getOperand() 0 3 1
A equals() 0 3 2
1
<?php
2
3
namespace PPP\DataModel;
4
5
6
/**
7
 * A reducer node e.g. an operator list -> resource
8
 *
9
 * @licence AGPLv3+
10
 * @author Thomas Pellissier Tanon
11
 */
12
abstract class ReducerNode extends AbstractNode {
13
14
	/**
15
	 * @var AbstractNode
16
	 */
17
	private $operand;
18
19
	/**
20
	 * @param AbstractNode $operand
21
	 */
22
	public function __construct($operand) {
23
		$this->operand = $operand;
24
	}
25
26
	/**
27
	 * @return AbstractNode[]
28
	 */
29
	public function getOperand() {
30
		return $this->operand;
31
	}
32
33
	/**
34
	 * @see AbstractNode::equals
35
	 */
36
	public function equals($target) {
37
		return $target instanceof self && $this->operand->equals($target->operand);
38
	}
39
}
40