Skip to content

Multiline return fails to parse #6

@Majkl578

Description

@Majkl578

Having this phpDoc:

    /**
     * Parses and builds AST for the given Query.
     *
     * @return \Doctrine\ORM\Query\AST\SelectStatement |
     *         \Doctrine\ORM\Query\AST\UpdateStatement |
     *         \Doctrine\ORM\Query\AST\DeleteStatement
     */

PHPStan 0.9.2 errors with:

  234    PHPDoc tag @return has invalid value (\Doctrine\ORM\Query\AST\SelectStatement |): Unexpected token "\n     *", expected TOKEN_IDENTIFIER at offset 117

This is currently used in Doctrine: https://github.com/doctrine/doctrine2/blob/2de6c807c8617b888bbb9da8b0908648432b3673/lib/Doctrine/ORM/Query/Parser.php#L227

Is this by design, bug or simply overseen case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions