-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Description
Bug report
PHPStan 0.12.50
Cannot call method update() on App\Entity\MyEntity|false when it can't be false.
Code snippet that reproduces the problem
/** @var \Doctrine\Common\Collections\Collection<MyEntity> $collection */
if ($collection->isEmpty()) {
$collection->add($new);
} else {
$collection->first()->update($new); // Cannot call method update() on App\Entity\MyEntity|false
}Expected output
There should not be any error, but Cannot call method update() on App\Entity\MyEntity|false raised
Metadata
Metadata
Assignees
Labels
No labels