Skip to content

Commit

Permalink
EchoNode: Add helper methods for EchoType checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Apr 16, 2024
1 parent de29c22 commit b07689e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Nodes/EchoNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ class EchoNode extends AbstractNode
*/
public EchoType $type = EchoType::Echo;

public function isRaw(): bool
{
return $this->type === EchoType::RawEcho;
}

public function isTriple(): bool
{
return $this->type === EchoType::TripleEcho;
}

public function isRegular(): bool
{
return $this->type === EchoType::Echo;
}

private function getPrefix(): string
{
return match ($this->type) {
Expand Down

0 comments on commit b07689e

Please sign in to comment.