-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
Description
I've run into this problem with Kdyby/Doctrine:
namespace Doctrine\ORM;
class EntityManager
{
/**
* @return void
*/
public function persist($entity) {}
}
namespace Kdyby\Doctrine;
class EntityManager extends \Doctrine\ORM\EntityManager
{
/**
* {@inheritdoc}
* @return EntityManager
*/
public function persist($entity) {}
}
I'd expect the return type to be Kdyby\Doctrine\EntityManager
, however,
/** @var Kdyby\Doctrine\EntityManager $em */
$em->persist($entity)->flush();
reports errors:
Cannot call method flush() on void.
Result of method Kdyby\Doctrine\EntityManager::persist() (void) is used.
(phpstan 0.7.0)
sstok
Metadata
Metadata
Assignees
Labels
No labels