Skip to content

Commit 9143577

Browse files
committed
Rename local variable to $haltCompilerStatement
1 parent 525aced commit 9143577

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Parser.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2858,14 +2858,14 @@ private function parseUnsetStatement($parentNode) {
28582858
}
28592859

28602860
private function parseHaltCompilerStatement($parentNode) {
2861-
$unsetStatement = new HaltCompilerStatement();
2862-
$unsetStatement->parent = $parentNode;
2861+
$haltCompilerStatement = new HaltCompilerStatement();
2862+
$haltCompilerStatement->parent = $parentNode;
28632863

2864-
$unsetStatement->haltCompilerKeyword = $this->eat1(TokenKind::HaltCompilerKeyword);
2865-
$unsetStatement->openParen = $this->eat1(TokenKind::OpenParenToken);
2866-
$unsetStatement->closeParen = $this->eat1(TokenKind::CloseParenToken);
2864+
$haltCompilerStatement->haltCompilerKeyword = $this->eat1(TokenKind::HaltCompilerKeyword);
2865+
$haltCompilerStatement->openParen = $this->eat1(TokenKind::OpenParenToken);
2866+
$haltCompilerStatement->closeParen = $this->eat1(TokenKind::CloseParenToken);
28672867
// There is an implicit ';' before the closing php tag.
2868-
$unsetStatement->semicolonOrCloseTag = $this->eat(TokenKind::SemicolonToken, TokenKind::ScriptSectionEndTag);
2868+
$haltCompilerStatement->semicolonOrCloseTag = $this->eat(TokenKind::SemicolonToken, TokenKind::ScriptSectionEndTag);
28692869
// token_get_all() will return up to 3 tokens after __halt_compiler regardless of whether they're the right ones.
28702870
// For invalid php snippets, combine the remaining tokens into InlineHtml
28712871
$remainingTokens = [];
@@ -2876,9 +2876,9 @@ private function parseHaltCompilerStatement($parentNode) {
28762876
if ($remainingTokens) {
28772877
$firstToken = $remainingTokens[0];
28782878
$lastToken = end($remainingTokens);
2879-
$unsetStatement->data = new Token(TokenKind::InlineHtml, $firstToken->fullStart, $firstToken->start, $lastToken->fullStart + $lastToken->length - $firstToken->fullStart);
2879+
$haltCompilerStatement->data = new Token(TokenKind::InlineHtml, $firstToken->fullStart, $firstToken->start, $lastToken->fullStart + $lastToken->length - $firstToken->fullStart);
28802880
}
2881-
return $unsetStatement;
2881+
return $haltCompilerStatement;
28822882
}
28832883

28842884
private function parseArrayCreationExpression($parentNode) {

0 commit comments

Comments
 (0)