DX: fix phpstan issues

This commit is contained in:
2023-03-28 22:32:08 +02:00
parent 331443ae12
commit 48772efd54
27 changed files with 76 additions and 1309 deletions

View File

@@ -29,6 +29,7 @@ use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM;
use LogicException;
use Symfony\Component\Serializer\Annotation as Serializer;
@@ -507,10 +508,10 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
}
/**
* @return Collection|User[]
* @return ReadableCollection<(int|string), User>
* @Serializer\Groups({"calendar:read", "read"})
*/
public function getUsers(): Collection
public function getUsers(): ReadableCollection
{
return $this->getInvites()->map(static function (Invite $i) {
return $i->getUser();