Skip to content

Commit

Permalink
chore: fix TODO tasks about T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG sup…
Browse files Browse the repository at this point in the history
…port (#7316)
  • Loading branch information
keradus committed Sep 22, 2023
1 parent 40c1825 commit 41f3b22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Tokenizer/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static function getObjectOperatorKinds(): array
*/
public function equals($other, bool $caseSensitive = true): bool
{
if (\defined('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG')) { // @TODO: drop condition with new MAJOR release 4.0
if (\defined('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG')) { // @TODO: drop condition when PHP 8.1+ is required
if ('&' === $other) {
return '&' === $this->content && (null === $this->id || $this->isGivenKind([T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG, T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG]));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Tokenizer/TokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public static function provideEqualsCases(): iterable
yield [$function, false, [T_FUNCTION, 'function', 'unexpected']];

yield [new Token('&'), true, '&'];
if (\defined('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG')) { // @TODO: drop condition with new MAJOR release 4.0
if (\defined('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG')) { // @TODO: drop condition when PHP 8.1+ is required
yield [new Token('&'), true, new Token([T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG, '&'])];

yield [new Token('&'), true, new Token([T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, '&'])];
Expand Down

0 comments on commit 41f3b22

Please sign in to comment.