Skip to content

NewConstantScalarExpressions: improve and expand tests (modern PHP)#1463

Merged
wimg merged 6 commits intodevelopfrom
feature/newconstantscalarexpressions-improve-tests
Jan 8, 2023
Merged

NewConstantScalarExpressions: improve and expand tests (modern PHP)#1463
wimg merged 6 commits intodevelopfrom
feature/newconstantscalarexpressions-improve-tests

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Jan 3, 2023

NewConstantScalarExpressions: minor code simplification

PHPCS contains a token array listing all the magic constants since PHPCS 3.5.6.

NewConstantScalarExpressions: add some additional tests

... to cover previously uncovered code paths.

NewConstantScalarExpressions: code simplification using PHPCSUtils

Use the PHPCSUtils Arrays::getDoubleArrowPtr() method to retrieve the stack pointer to the applicable double arrow for the current array item.

This should improve efficiency and reliability.

NewConstantScalarExpressions: add test with PHP 7.4+ arrow function

... to safeguard this is handled correctly.

NewConstantScalarExpressions: add tests with constant in PHP 8.1+ enum

... to safeguard these are handled correctly.

NewConstantScalarExpressions: add tests with PHP 8.2+ constants in traits

... to safeguard these are handled correctly.

jrfnl added 6 commits January 4, 2023 00:11
PHPCS contains a token array listing all the magic constants since PHPCS 3.5.6.
... to cover previously uncovered code paths.
Use the PHPCSUtils `Arrays::getDoubleArrowPtr()` method to retrieve the stack pointer to the applicable double arrow for the current array item.

This should improve efficiency and reliability.
... to safeguard this is handled correctly.
... to safeguard these are handled correctly.
…aits

... to safeguard these are handled correctly.
@jrfnl jrfnl added Type: chores/QA PR: quick merge PR only contains relatively simple changes PR: ready for review labels Jan 3, 2023
@jrfnl jrfnl added this to the 10.0.0 milestone Jan 3, 2023
@jrfnl jrfnl requested a review from wimg January 3, 2023 23:34
@wimg wimg merged commit 0837737 into develop Jan 8, 2023
@wimg wimg deleted the feature/newconstantscalarexpressions-improve-tests branch January 8, 2023 14:48
@github-actions github-actions bot removed PR: ready for review PR: quick merge PR only contains relatively simple changes labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants