Skip to content

Fix parsing of /** @param/@return */ $x = function(){} #7

@TysonAndre

Description

@TysonAndre

My current thoughts are to walk the tree in post-order.
Track 0 or 1 doc comments, ignoring regular comments

  1. If there is a doc comment, replace the previous comment

  2. If there is a closure/method/function/class/etc (Anything where reflection would return a doc comment) and there is an applicable phpdoc2 tag (Or one the caller recognizes), then apply it.
    (Or just any phpdoc2 tag)

    /** @param $y */ $x = function($y) {}

  3. If there is an @var tag, and a variable is seen, then annotate that variable as having that type, somehow (passed in or assigned to)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions