Failed Conditions
Push — master ( 04820f...7dec56 )
by Moesjarraf
03:10
created

Reference   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 1
cbo 3
dl 0
loc 21
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A applyToNode() 0 7 1
1
<?php
2
3
namespace LegalThings\DataEnricher\Processor;
4
5
use LegalThings\DataEnricher\Processor;
6
use LegalThings\DataEnricher\Processor\Helper;
7
use LegalThings\DataEnricher\Node;
8
9
/**
10
 * Symbolic link to a property of the source object
11
 */
12
class Reference implements Processor
13
{
14
    use Processor\Implementation,
15
        Helper\GetByReference
16
    {
17
        Helper\GetByReference::withSourceAndTarget insteadof Processor\Implementation;
18
    }
19
    
20
    /**
21
     * Apply reference processing to a single node
22
     * 
23
     * @param Node $node
24
     */
25 1
    public function applyToNode(Node $node)
26
    {
27 1
        $ref = $node->getInstruction($this);
28
        
29 1
        $result = $this->getByReference($ref, $this->source, $this->target);
30 1
        $node->setResult($result);
31 1
    }
32
}
33