Skip to content

Conversation

@TysonAndre
Copy link
Contributor

  • Some node subclasses have Token (not an array) as $this->children
  • Undefined variable in coalesce
  • be more specific about getRoot()'s expected value.
  • use string ...$classNames (same syntax as a real signature)
    https://github.com/phpDocumentor/fig-standards/pull/87#r37054459
  • EchoExpression has ExpressionList (no expressions would be invalid PHP)
  • One form of string literal can be a single token, others (e.g. "something $varName" may have multiple tokens and expressions)

- Some node subclasses have `Token` (not an array) as `$this->children`
- Undefined variable in coalesce
- be more specific about getRoot()'s expected value.
- use string ...$classNames (same syntax as a real signature)
  https://github.com/phpDocumentor/fig-standards/pull/87#r37054459
- EchoExpression has ExpressionList (no expressions would be invalid PHP)
@msftclas
Copy link

@TysonAndre,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

* Returns null if there is no match.
*
* @param array ...$classNames
* @param string ...$classNames

Choose a reason for hiding this comment

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

Are you sure this needs to be string and not string[]? Could you point to docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/phpDocumentor/fig-standards/pull/87#r37054459 is what an owner of phpDocumentor said

Doesn't seem to be part of PSR-5 yet, but haven't checked: https://youtrack.jetbrains.com/issue/WI-29429

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, not in PSR-5.

Also see https://github.com/phpDocumentor/ReflectionDocBlock/blob/14f9edf1ae14d6ce417afb05a9ed37d7b3cc341e/tests/unit/DocBlock/Tags/ParamTest.php#L152-L168 for how the phpdocumentor implementation works. It parses the individual element types as string from @param string ...$varName

class NumericLiteral extends Expression {
/** @var Token[] */
/** @var Token */
public $children;
Copy link
Member

Choose a reason for hiding this comment

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

Weird for this to be called children when it's only ever a single token.

@roblourens roblourens merged commit da02e06 into microsoft:master Sep 18, 2017
@roblourens
Copy link
Member

Thanks!

@TysonAndre TysonAndre deleted the Node-phpdoc-phan-nits branch June 19, 2018 02:16
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.

4 participants