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

StackedExpressionNode::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
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 StackedExpressionNode extends Node
8
{
9
    /**
10
     * @var Node[]
11
     */
12
    protected array $stack = [];
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_ARRAY, expecting T_FUNCTION or T_CONST
Loading history...
13
14
    /**
15
     * @param Node[] $stack
16
     */
17
    public function __construct(array $stack)
18
    {
19
        $this->stack = $stack;
20
    }
21
22
    public function evaluate()
23
    {
24
        foreach ($this->stack as $stack) {
25
            $stack->evaluate();
26
        }
27
    }
28
}
29