Upstream PR PHPCSStandards/PHP_CodeSniffer#387 introduced support for DNF types to PHPCS itself, introducing two new tokens for the DNF parentheses: T_TYPE_OPEN_PARENTHESIS and T_TYPE_CLOSE_PARENTHESIS.
This commit adds these new tokens to the appropriate token collections in the Collections class.
This will automatically add support for DNF types to various methods in PHPCSUtils.
Includes updated unit tests.
PHP 8.2 | BCFile/FunctionDeclarations::get[Method]Parameters(): add support for DNF types
The changes in the BCFile class mirror the upstream changes.
As for the FunctionDeclarations class: support was automatically added when the Collections::parameterTypeTokens() were updated.
Includes tests.
Closes #567
PHP 8.2 | BCFile/FunctionDeclarations::get[Method]Properties(): add tests for DNF types
The BCFile method inherits the necessary changes from PHPCS 3.10.0..
As for the FunctionDeclarations class: support was automatically added when the Collections::returnTypeTokens() were updated.
Includes tests.
PHP 8.2 | BCFile/Variables::getMemberProperties(): add tests for DNF types
The BCFile method inherites the necessary changes from PHPCS 3.10.0..
As for the Variables class: support was automatically added when the Collections::propertyTypeTokens() were updated.
Includes tests.
IsReferenceTest: add extra tests with intersection/DNF types
PHP 8.2 | Collections: add support for DNF types
Upstream PR PHPCSStandards/PHP_CodeSniffer#387 introduced support for DNF types to PHPCS itself, introducing two new tokens for the DNF parentheses:
T_TYPE_OPEN_PARENTHESIS
andT_TYPE_CLOSE_PARENTHESIS
.This commit adds these new tokens to the appropriate token collections in the
Collections
class.This will automatically add support for DNF types to various methods in PHPCSUtils.
Includes updated unit tests.
PHP 8.2 | BCFile/FunctionDeclarations::get[Method]Parameters(): add support for DNF types
The changes in the
BCFile
class mirror the upstream changes.As for the
FunctionDeclarations
class: support was automatically added when theCollections::parameterTypeTokens()
were updated.Includes tests.
Closes #567
PHP 8.2 | BCFile/FunctionDeclarations::get[Method]Properties(): add tests for DNF types
The
BCFile
method inherits the necessary changes from PHPCS 3.10.0..As for the
FunctionDeclarations
class: support was automatically added when theCollections::returnTypeTokens()
were updated.Includes tests.
PHP 8.2 | BCFile/Variables::getMemberProperties(): add tests for DNF types
The
BCFile
method inherites the necessary changes from PHPCS 3.10.0..As for the
Variables
class: support was automatically added when theCollections::propertyTypeTokens()
were updated.Includes tests.
IsReferenceTest: add extra tests with intersection/DNF types