Skip to content

Clarify $this keyword usage in PHPDoc types#4104

Merged
jaapio merged 2 commits into
phpDocumentor:masterfrom
lacatoire:docs/clarify-this-pseudo-type
Apr 14, 2026
Merged

Clarify $this keyword usage in PHPDoc types#4104
jaapio merged 2 commits into
phpDocumentor:masterfrom
lacatoire:docs/clarify-this-pseudo-type

Conversation

@lacatoire

Copy link
Copy Markdown
Contributor

Fixes #1896.

Removes the $this entry from the Supported Types guide (it is not a formal PHPDoc type) and moves the explanation to the @return tag reference, where $this is actually meaningful for fluent interfaces.

Direction agreed with @jaapio in the issue thread.

@jaapio jaapio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improvement

@jaapio jaapio merged commit 18a9a39 into phpDocumentor:master Apr 14, 2026
116 checks passed
@lacatoire lacatoire deleted the docs/clarify-this-pseudo-type branch May 7, 2026 10:59
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.

Outdated docs page for Anatomy of a Type

2 participants