mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
DX: fix phpstan issues
This commit is contained in:
@@ -544,21 +544,6 @@ class CalendarController extends AbstractController
|
||||
return $filterOrder->build();
|
||||
}
|
||||
|
||||
private function buildParamsToUrl(?User $user, ?AccompanyingPeriod $accompanyingPeriod): array
|
||||
{
|
||||
$params = [];
|
||||
|
||||
if (null !== $user) {
|
||||
$params['user_id'] = $user->getId();
|
||||
}
|
||||
|
||||
if (null !== $accompanyingPeriod) {
|
||||
$params['id'] = $accompanyingPeriod->getId();
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a form to delete a Calendar entity by id.
|
||||
*/
|
||||
|
@@ -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();
|
||||
|
@@ -52,7 +52,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
|
||||
return 'Exports of calendar';
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data): Closure
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
if ('export_result' !== $key) {
|
||||
throw new LogicException("the key {$key} is not used by this export");
|
||||
|
Reference in New Issue
Block a user