mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: fix phpstan errors
This commit is contained in:
@@ -14,6 +14,8 @@ namespace Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Doctrine\ORM\Event\LifecycleEventArgs;
|
||||
use Doctrine\ORM\Event\PrePersistEventArgs;
|
||||
use Doctrine\ORM\Event\PreUpdateEventArgs;
|
||||
|
||||
/**
|
||||
* This service listens for preUpdate and prePersist events on some entities
|
||||
@@ -26,22 +28,22 @@ use Doctrine\ORM\Event\LifecycleEventArgs;
|
||||
*/
|
||||
final class AccompanyingPeriodSocialIssueConsistencyEntityListener
|
||||
{
|
||||
public function prePersist(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, LifecycleEventArgs $eventArgs)
|
||||
public function prePersist(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, PrePersistEventArgs $eventArgs)
|
||||
{
|
||||
$this->ensureConsistencyEntity($entity);
|
||||
}
|
||||
|
||||
public function prePersistAccompanyingPeriod(AccompanyingPeriod $period, LifecycleEventArgs $eventArgs)
|
||||
public function prePersistAccompanyingPeriod(AccompanyingPeriod $period, PrePersistEventArgs $eventArgs)
|
||||
{
|
||||
$this->ensureConsistencyAccompanyingPeriod($period);
|
||||
}
|
||||
|
||||
public function preUpdate(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, LifecycleEventArgs $eventArgs)
|
||||
public function preUpdate(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, PreUpdateEventArgs $eventArgs)
|
||||
{
|
||||
$this->ensureConsistencyEntity($entity);
|
||||
}
|
||||
|
||||
public function preUpdateAccompanyingPeriod(AccompanyingPeriod $period, LifecycleEventArgs $eventArgs)
|
||||
public function preUpdateAccompanyingPeriod(AccompanyingPeriod $period, PreUpdateEventArgs $eventArgs)
|
||||
{
|
||||
$this->ensureConsistencyAccompanyingPeriod($period);
|
||||
}
|
||||
|
@@ -51,6 +51,9 @@ use function json_decode;
|
||||
use const JSON_PRETTY_PRINT;
|
||||
use const LC_TIME;
|
||||
|
||||
/**
|
||||
* @deprecated, to remove in a next version
|
||||
*/
|
||||
final class ImportPeopleFromCSVCommand extends Command
|
||||
{
|
||||
protected $cacheAnswersMapping = [];
|
||||
@@ -1021,6 +1024,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
|
||||
foreach ($possibleFormats as $format) {
|
||||
$this->logger->debug("Trying format {$format}", [__METHOD__]);
|
||||
/** @phpstan-ignore-next-line */
|
||||
$dateR = strptime($value, $format);
|
||||
|
||||
if (is_array($dateR) && '' === $dateR['unparsed']) {
|
||||
|
@@ -881,7 +881,7 @@ class AccompanyingPeriod implements
|
||||
/**
|
||||
* Get a list of all persons which are participating to this course.
|
||||
*
|
||||
* @psalm-return Collection<int, Person>
|
||||
* @psalm-return Collection<(int|string), Person|null>
|
||||
*/
|
||||
public function getPersons(): Collection
|
||||
{
|
||||
|
Reference in New Issue
Block a user