Skip to content

Commit

Permalink
Merge pull request #32 from ryangjchandler/echo-helper-methods
Browse files Browse the repository at this point in the history
EchoNode: Add helper methods for EchoType checks
  • Loading branch information
JohnathonKoster authored Apr 16, 2024
2 parents de29c22 + b07689e commit ea05ebf
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 ea05ebf

Please sign in to comment.