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

GetVariableExpressionNode   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 20
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
class GetVariableExpressionNode extends Node
8
{
9
    protected string $key;
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...
10
11
    public function __construct(string $key)
12
    {
13
        $this->key = $key;
14
    }
15
16
    public function evaluate()
17
    {
18
        return $this->getContext()->get($this->key);
19
    }
20
}
21