Skip to content
New issue

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

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

Already on GitHub? # to your account

Generic/UselessOverridingMethod: improve handling of PHP open/close tags between statements #554

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 16, 2024

Description

This change prevents an edge-case false negative where a parent::method() function call statement ended by a PHP close tag without any "function content" of note after it, would not be reported as a useless overriding method.

Includes unit tests.

Suggested changelog entry

Generic.CodeAnalysis.UselessOverridingMethod: prevent edge case false negative when the call to the parent method would end on a PHP close tag.

Related issues/external references

Related to #552

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

…ags between statements

This change prevents an edge-case false negative where a `parent::method()` function call statement ended by a PHP close tag without any "function content" of note after it, would not be reported as a useless overriding method.

Includes unit tests.

Related to 552
@jrfnl jrfnl force-pushed the feature/552-generic-uselessoverridingmethod-bugfix-close-tag branch from c98adfd to 7642636 Compare July 19, 2024 18:59
@jrfnl
Copy link
Member Author

jrfnl commented Jul 19, 2024

Rebased without changes to get this ready for merge tomorrow.

@jrfnl jrfnl merged commit 2367a62 into master Jul 20, 2024
48 checks passed
@jrfnl jrfnl deleted the feature/552-generic-uselessoverridingmethod-bugfix-close-tag branch July 20, 2024 03:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant