Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | abstract class AbstractReturnValue |
||
8 | { |
||
9 | |||
10 | public const ACTION_NO_ACTION = 'NO_ACTION'; |
||
11 | public const ACTION_BREAK = 'BREAK'; |
||
12 | public const ACTION_DELETE = 'DELETE'; |
||
13 | public const ACTION_REPLACE = 'REPLACE'; |
||
14 | |||
15 | /** |
||
16 | * @var NodeInterface|null |
||
17 | */ |
||
18 | protected $value; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $action; |
||
24 | |||
25 | /** |
||
26 | * @param NodeInterface|null $value |
||
27 | * @param string $action |
||
28 | */ |
||
29 | public function __construct(?NodeInterface $value = null, string $action = self::ACTION_NO_ACTION) |
||
30 | { |
||
31 | $this->value = $value; |
||
32 | $this->action = $action; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return NodeInterface|null |
||
37 | */ |
||
38 | public function getValue(): ?NodeInterface |
||
39 | { |
||
40 | return $this->value; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getAction(): string |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @param string $action |
||
53 | * @return self |
||
54 | */ |
||
55 | public function setAction(string $action): self |
||
62 |