Skip to content

Commit

Permalink
Merge cac5410 into 4220825
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Sep 13, 2020
2 parents 4220825 + cac5410 commit 7dd0a61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PHPCSUtils/Utils/FunctionDeclarations.php
Expand Up @@ -404,6 +404,7 @@ public static function getProperties(File $phpcsFile, $stackPtr)
* - Support for PHP 8.0 union types.
* - Support for PHP 8.0 constructor property promotion.
* - Support for namespace operator in type declarations.
* - Support for PHP 8.0 identifier name tokens in parameter types, cross-version PHP & PHPCS.
*
* @see \PHP_CodeSniffer\Files\File::getMethodParameters() Original source.
* @see \PHPCSUtils\BackCompat\BCFile::getMethodParameters() Cross-version compatible version of the original.
Expand All @@ -412,6 +413,7 @@ public static function getProperties(File $phpcsFile, $stackPtr)
* @since 1.0.0-alpha2 Added BC support for PHP 7.4 arrow functions.
* @since 1.0.0-alpha4 Added support for PHP 8.0 union types.
* @since 1.0.0-alpha4 Added support for PHP 8.0 constructor property promotion.
* @since 1.0.0-alpha4 Added support for PHP 8.0 identifier name tokenization.
*
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
* @param int $stackPtr The position in the stack of the function token
Expand Down Expand Up @@ -509,6 +511,9 @@ public static function getParameters(File $phpcsFile, $stackPtr)
case 'T_STRING':
case 'T_NAMESPACE':
case 'T_NS_SEPARATOR':
case 'T_NAME_QUALIFIED':
case 'T_NAME_FULLY_QUALIFIED':
case 'T_NAME_RELATIVE':
case 'T_BITWISE_OR': // Union type separator.
if ($typeHintToken === false) {
$typeHintToken = $i;
Expand Down

0 comments on commit 7dd0a61

Please sign in to comment.