Skip to content

Method test::getItems() with return type void returns *NEVER* but should not return anything. #30

@arnaud-lb

Description

@arnaud-lb

When the doctrine plugin is enabled, I get an error with when analysing this code in level 7:

<?php

use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Selectable;

class test
{
    /**
     * @var test[]&Collection&Selectable
     */
    private $items;

    /**
     * @return test[]&Collection&Selectable
     */
    public function getItems(): Collection
    {
        return $this->items;
    }
}

The error:

Method test::getItems() with return type void returns *NEVER* but should not return anything.

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