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

CodeAnalysis/ConstructorDestructorReturn: correctly ignore PHP-4-style constructors in namespaced classes #272

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 17, 2023

Methods with the same name as a class are not recognized as PHP4-style constructors in namespaced classes.

This was so far not taken into account in this sniff, leading to false positives.

A better solution, with a lower performance impact is expected at a later point in time (namespace tracker), however, as my time is limited, it may still be a while before that solution is available.

In the mean time, let's just fix it.

Includes test.

Related to #207

…e constructors in namespaced classes

Methods with the same name as a class are not recognized as PHP4-style constructors in namespaced classes.

This was so far not taken into account in this sniff, leading to false positives.

A better solution, with a lower performance impact is expected at a later point in time (namespace tracker), however, as my time is limited, it may still be a while before that solution is available.

In the mean time, let's just fix it.

Includes test.
@jrfnl jrfnl added this to the 1.1.x Next milestone Sep 17, 2023
@jrfnl jrfnl merged commit 847fe40 into develop Sep 17, 2023
39 checks passed
@jrfnl jrfnl deleted the universal/constructordestructorreturn-allow-for-namespaced-classes branch September 17, 2023 04:08
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.

None yet

1 participant