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

Improve parameter rendering #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simPod
Copy link

@simPod simPod commented Mar 7, 2020

This is a reaction to php/doc-en#55

Allows to properly render:

  • arguments
  • arguments by reference
  • varible-length argument lists
  • varible-length argument lists passed by reference

It will also require changes (see below) in docs repository (I will send PR) but did not find a non-BC breaking way because:

  • params in docs are currently named as ...
  • the param name build is performed as <tag>$ + param_name resulting in <tag>$param_name
  • however, that does not work for variadic args as we need ...$args instead of $...args

Current:

<methodparam choice="opt">
    <type>bool|float|int|string</type>
    <parameter>...</parameter>
</methodparam>

sprintf ( string $format [, mixed $... ] ) : string

This PR allows:

<methodparam choice="opt">
    <type>bool|float|int|string</type>
    <parameter role="vararglist">args</parameter>
</methodparam>

sprintf ( string $format [, mixed ...$args ] ) : string

Allow to properly render:
- arguments
- arguments by reference
- varible-length argument lists
- varible-length argument lists passed by reference
simPod added a commit to simPod/phpdoc-base that referenced this pull request Mar 7, 2020
simPod added a commit to simPod/doc-en that referenced this pull request Mar 7, 2020
simPod added a commit to simPod/doc-en that referenced this pull request Mar 7, 2020
@cmb69
Copy link
Member

cmb69 commented Oct 17, 2020

Oh, I haven't seen this PR before. From what I can tell, this is basically the same as PR #28, while potentially #29 would be preferable.

@simPod
Copy link
Author

simPod commented Oct 17, 2020

Kk let's proceed there

@cmb69
Copy link
Member

cmb69 commented Nov 2, 2020

PR #29 has just been merged; it seems to me this PR is now obsolete. However, we may need to port the changes to other renderers, although I'm not sure whether these are still used at all.

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.

2 participants