Skip to content

Short doc block does not get type hint #31

@Delvar

Description

@Delvar

When using short doc block there is no type hinting.

    /** @var  int */
    private $testInt = 0;

    /**
     * Set the value of testInt
     */
    public function setTestInt($testInt): self
    {
        $this->testInt = $testInt;

        return $this;
    }

with multi line dock block it sets the type correctly

    /** 
     * @var  int
     */
    private $testInt2 = 0;

    /**
     * Set the value of testInt2
     */
    public function setTestInt2(int $testInt2): self
    {
        $this->testInt2 = $testInt2;

        return $this;
    }

also the @param and @return attributes are not populated in the new dock block, though I can get around this with templates.

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