mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 21:34:59 +00:00
DX: fix phpstan issues
This commit is contained in:
@@ -42,6 +42,7 @@ use DateTimeInterface;
|
||||
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 Iterator;
|
||||
use LogicException;
|
||||
@@ -615,9 +616,9 @@ class AccompanyingPeriod implements
|
||||
/**
|
||||
* Get a list of person which have an adresse available for a valid location.
|
||||
*
|
||||
* @return Collection|Person[]
|
||||
* @return ReadableCollection<(int|string), Person>
|
||||
*/
|
||||
public function getAvailablePersonLocation(): Collection
|
||||
public function getAvailablePersonLocation(): ReadableCollection
|
||||
{
|
||||
return $this->getOpenParticipations()
|
||||
->filter(
|
||||
@@ -675,8 +676,9 @@ class AccompanyingPeriod implements
|
||||
|
||||
/**
|
||||
* @Groups({"read"})
|
||||
* @return ReadableCollection<(int|string), Comment>
|
||||
*/
|
||||
public function getComments(): Collection
|
||||
public function getComments(): ReadableCollection
|
||||
{
|
||||
$pinnedComment = $this->pinnedComment;
|
||||
|
||||
@@ -700,7 +702,7 @@ class AccompanyingPeriod implements
|
||||
/**
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
public function getCurrentParticipations(): Collection
|
||||
public function getCurrentParticipations(): ReadableCollection
|
||||
{
|
||||
return $this->getOpenParticipations();
|
||||
}
|
||||
@@ -834,7 +836,10 @@ class AccompanyingPeriod implements
|
||||
return $collection->count() > 0 ? $collection->first() : null;
|
||||
}
|
||||
|
||||
public function getOpenParticipations(): Collection
|
||||
/**
|
||||
* @return ReadableCollection<(int|string), AccompanyingPeriodParticipation>
|
||||
*/
|
||||
public function getOpenParticipations(): ReadableCollection
|
||||
{
|
||||
return $this
|
||||
->getParticipations()
|
||||
@@ -860,8 +865,9 @@ class AccompanyingPeriod implements
|
||||
|
||||
/**
|
||||
* Get the participation containing a person.
|
||||
* @return ReadableCollection<(int|string), AccompanyingPeriodParticipation>
|
||||
*/
|
||||
public function getParticipationsContainsPerson(Person $person): Collection
|
||||
public function getParticipationsContainsPerson(Person $person): ReadableCollection
|
||||
{
|
||||
return $this
|
||||
->getParticipations()
|
||||
|
Reference in New Issue
Block a user