Skip to content

Match method-name docblock descriptions containing articles#47

Merged
TomasVotruba merged 2 commits into
mainfrom
match-articles-in-method-name-duplicate-description
Jul 12, 2026
Merged

Match method-name docblock descriptions containing articles#47
TomasVotruba merged 2 commits into
mainfrom
match-articles-in-method-name-duplicate-description

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

RemoveMethodNameDuplicateDescriptionFixer already strips trailing punctuation and handles getter/setter verb mix-ups, but a human-written description with an article (a/an/the) slipped through — the space-stripped line no longer matched the method name.

This drops article words (word-boundary matched, so theme etc. stay intact) before the comparison.

 final class ApiIntegration
 {
     /**
-     * Get the API helper.
-     *
      * @return object
      */
     public function getApiHelper()
     {
     }
 }

New fixture with_articles.php.inc covers it; existing cases (Set name, Set name., getter/setter mix-up) still pass.

@TomasVotruba TomasVotruba merged commit 2400242 into main Jul 12, 2026
8 checks passed
@TomasVotruba TomasVotruba deleted the match-articles-in-method-name-duplicate-description branch July 12, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant