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

Block::setParser()   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\Parser\Blockly;
6
7
use Linio\Component\RuleEngine\Ast\CompileNode;
8
use Linio\Component\RuleEngine\Ast\Node;
9
use Linio\Component\RuleEngine\Parser\ParserInterface;
10
use SimpleXMLElement;
11
12
abstract class Block
13
{
14
    protected ?ParserInterface $parser;
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 '?', expecting T_FUNCTION or T_CONST
Loading history...
15
16
    public function setParser(ParserInterface $parser): void
17
    {
18
        $this->parser = $parser;
19
    }
20
21
    abstract public function getNode(CompileNode $root, SimpleXMLElement $block): Node;
22
23
    abstract public function getType(): string;
24
}
25