Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConstructorDestructorReturn: respect a potentially set php_version config value #208

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jan 6, 2023

PHP4-style constructors - methods with the same name as the class - are no longer regarded as constructors on PHP 8.0 or higher.

This adjusts the sniff to respect a potentially set php_version configuration value and will prevent the sniff from reporting on PHP4-style constructors when the php_version is set to PHP 8.0 or higher.

Includes unit tests.

Partially fixes #207

…config value

PHP4-style constructors - methods with the same name as the class - are no longer regarded as constructors on PHP 8.0 or higher.

This adjusts the sniff to respect a potentially set `php_version` configuration value and will prevent the sniff from reporting on PHP4-style constructors when the `php_version` is set to PHP 8.0 or higher.

Includes unit tests.

Partially fixes 207
@jrfnl jrfnl added this to the 1.x Next milestone Jan 6, 2023
@jrfnl jrfnl merged commit 39ac431 into develop Jan 9, 2023
@jrfnl jrfnl deleted the universal/207-constructordestructorreturn branch January 9, 2023 16:04
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.

Incorrect detection of PHP 4-style constructors by Universal.CodeAnalysis.ConstructorDestructorReturn
1 participant