Skip to content
This repository was archived by the owner on Jul 12, 2026. It is now read-only.

Match method-name docblock descriptions with articles and punctuation#89

Closed
TomasVotruba wants to merge 3 commits into
mainfrom
handle-articles-in-method-name-duplicate-description
Closed

Match method-name docblock descriptions with articles and punctuation#89
TomasVotruba wants to merge 3 commits into
mainfrom
handle-articles-in-method-name-duplicate-description

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

RemoveMethodNameDuplicateDescriptionFixer matched a description line only when its space-stripped content was exactly the method name (e.g. * Set namesetName). Human-written phrasing with articles or trailing punctuation slipped through.

This normalizes the line before comparison: drops articles (a/an/the) and strips non-alphanumeric chars (whitespace + trailing ., !, :).

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

Existing matches (Set name, Get now) still removed. New fixture with_articles.php.inc covers the article case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant