Skip to content

Tokens\Collections::$returnTypeTokens: allow for "static" (PHP 8) - #134

Merged
jrfnl merged 1 commit into
developfrom
feature/php8-allow-for-return-type-static
May 4, 2020
Merged

Tokens\Collections::$returnTypeTokens: allow for "static" (PHP 8)#134
jrfnl merged 1 commit into
developfrom
feature/php8-allow-for-return-type-static

Conversation

@jrfnl

@jrfnl jrfnl commented May 3, 2020

Copy link
Copy Markdown
Member

As of PHP 8.0, static can be used as a return type for function declarations.

Ref: https://wiki.php.net/rfc/static_return_type

Includes adding a unit test for the BCFile::getMethodProperties()/FunctionDeclarations::getProperties() methods to safeguard this.

Sister-PR to the upstream squizlabs/PHP_CodeSniffer#2952

As of PHP 8.0, `static` can be used as a return type for function declarations.

Ref: https://wiki.php.net/rfc/static_return_type

Includes adding a unit test for the `BCFile::getMethodProperties()`/`FunctionDeclarations::getProperties()` methods to safeguard this.

Sister-PR to the upstream squizlabs/PHP_CodeSniffer 2952
@jrfnl jrfnl added this to the 1.0.0-alpha3 milestone May 3, 2020
@jrfnl
jrfnl merged commit 167f512 into develop May 4, 2020
@jrfnl
jrfnl deleted the feature/php8-allow-for-return-type-static branch May 4, 2020 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant