Skip to content

Commit 26c6477

Browse files
committed
Remove duplicate array keys from PhpTokenizer.php
Detected via static analysis When there are duplicate array keys, the last entry takes precedence (e.g. the removed T_EXIT line had the wrong value)
1 parent 77579df commit 26c6477

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/PhpTokenizer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ public static function getTokensArrayFromContent(
148148
T_CONTINUE => TokenKind::ContinueKeyword,
149149
T_DECLARE => TokenKind::DeclareKeyword,
150150
T_DEFAULT => TokenKind::DefaultKeyword,
151-
T_EXIT => TokenKind::DieKeyword,
152151
T_DO => TokenKind::DoKeyword,
153152
T_ECHO => TokenKind::EchoKeyword,
154153
T_ELSE => TokenKind::ElseKeyword,
@@ -267,8 +266,6 @@ public static function getTokensArrayFromContent(
267266

268267
T_DNUMBER => TokenKind::FloatingLiteralToken,
269268

270-
T_CONSTANT_ENCAPSED_STRING => TokenKind::StringLiteralToken,
271-
272269
T_OPEN_TAG => TokenKind::ScriptSectionStartTag,
273270
T_OPEN_TAG_WITH_ECHO => TokenKind::ScriptSectionStartTag,
274271
T_CLOSE_TAG => TokenKind::ScriptSectionEndTag,

0 commit comments

Comments
 (0)