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