Completed
Push — master ( 2e4917...2e950a )
by Klaus
19:05 queued 19:05
created

Node   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 30
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Linio\Component\RuleEngine\Ast;
6
7
use Linio\Common\Type\Dictionary;
8
9
abstract class Node
10
{
11
    protected CompileNode $root;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
12
13
    public function getRoot(): CompileNode
14
    {
15
        return $this->root;
16
    }
17
18
    public function setRoot(CompileNode $root): void
19
    {
20
        $this->root = $root;
21
    }
22
23
    public function getContext(): Dictionary
24
    {
25
        return $this->root->getContext();
26
    }
27
28
    abstract public function evaluate();
29
}
30