Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Docs: improvements for "references - phpdoc - tags - property[<-read|-write>]" #2407

Merged

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jun 14, 2020

I've combined the contents of the @property, @property-read and @property-write pages into one documentation page as it makes more sense to read about these tags together.
The added benefit is, that this removed some (near) duplication in the documentation.

Note:

  • The pages will still show up individually in the table of contents, with the title for the @property documentation page being adjusted for the purposes of the TOC.
  • Existing (external/internal) links to these pages will not be broken as the @property-read and @property-write pages still exist, they will now just show the same contents as the @property page.

Summary:

  • Synced the text with the current text in PSR-19.
  • Added a link to the PHP manual page covering class properties.

Syntax:

  • Adjusted the specs to include @property-read and @property-write.

Description:

  • Based the text on PSR-19, with a rewritten "example" from the original text.
  • Added a table to make it more obvious when to use which tag.
  • Added links to the PHP manual pages covering the relevant magic methods.
    As the link text starts with an underscore, I wasn't sure having those links at the bottom of the page would work as there they would need to be prefixed with an underscore, so, in this case, for these specific links, I've left them inline.
  • Rephrased the "MUST NOT" phrase which contained a double negative to use "can ONLY" for clarity.

Effects in phpDocumentor:

  • Adjusted the text to include @property-read and @property-write.

Examples:

  • Expanded the original example to cover all three tags.
  • Added the example from PSR 19 as a secondary, more concrete example.

Other:

  • Minor inline markup and grammar fixes.
  • Made the syntax outline a code block.

Ref: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#510-property

@jrfnl jrfnl force-pushed the docs/update-reference-phpdoc-property branch from 9c66dbb to 5ab5788 Compare June 17, 2020 01:01
@mvriel
Copy link
Member

mvriel commented Oct 18, 2020

@ashnazg would you mind reviewing this PR? I'm afraid my priorities are elsewhere at the moment but having this reviewed would be awesome :)

…-write>]"

I've combined the contents of the `@property`, `@property-read` and `@property-write` pages into _one_ documentation page as it makes more sense to read about these tags together.
The added benefit is, that this removed some (near) duplication in the documentation.

Note:
* The pages will still show up individually in the table of contents, with the title for the `@property` documentation page being adjusted for the purposes of the TOC.
* Existing (external/internal) links to these pages will not be broken as the `@property-read` and `@property-write` pages still exist, they will now just show the same contents as the `@property` page.

Summary:
* Synced the text with the current text in PSR-19.
* Added a link to the PHP manual page covering class properties.

Syntax:
* Adjusted the specs to include `@property-read` and `@property-write`.

Description:
* Based the text on PSR-19, with a rewritten "example" from the original text.
* Added a table to make it more obvious when to use which tag.
* Added links to the PHP manual pages covering the relevant magic methods.
    As the link _text_ starts with an underscore, I wasn't sure having those links at the bottom of the page would work as there they would need to be prefixed with an underscore, so, in this case, for these specific links, I've left them inline.
* Rephrased the "MUST NOT" phrase which contained a double negative to use "can ONLY" for clarity.

Effects in phpDocumentor:
* Adjusted the text to include `@property-read` and `@property-write`.

Examples:
* Expanded the original example to cover all three tags.
* Added the example from PSR 19 as a secondary, more concrete example.

Other:
* Minor inline markup and grammar fixes.
* Made the syntax outline a code block.

Ref: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#510-property
@jrfnl jrfnl force-pushed the docs/update-reference-phpdoc-property branch from 5ab5788 to 78dcf4d Compare October 18, 2020 15:02
@mvriel mvriel merged commit cbd3e53 into phpDocumentor:master Oct 20, 2020
@jrfnl jrfnl deleted the docs/update-reference-phpdoc-property branch October 20, 2020 22:20
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.

3 participants