Skip to content

Match redundant @param docblocks across union order and FQN vs short name - #33

Merged
TomasVotruba merged 1 commit into
mainfrom
docparam-union-order-fqn
Sep 16, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
docparam-union-order-fqn

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Removing a redundant @param tag only fired when its type text matched the added native type character for character. Two common shapes were missed:

  • union members in a different order, e.g. @param string|array vs array|string
  • an imported short name vs a fully qualified union member, e.g. @param CompositeExpression|string vs \Doctrine\DBAL\Query\Expression\CompositeExpression|string

normalizeDocType now reduces each union member to its last name part and sorts them, so both sides compare equal and the tag is dropped.

Covered by two new cases in docparam_test.go.

@TomasVotruba
TomasVotruba merged commit 09b526d into main Sep 16, 2026
4 checks passed
@TomasVotruba
TomasVotruba deleted the docparam-union-order-fqn branch September 16, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant