phpstan boolean corrections

This commit is contained in:
2025-10-09 13:57:30 +02:00
parent 03fa79c93b
commit b132956ddc
37 changed files with 149 additions and 623 deletions

View File

@@ -83,7 +83,7 @@ final class ActivityController extends AbstractController
$activity = $this->activityRepository->find($id);
if (!$activity) {
if (null === $activity) {
throw $this->createNotFoundException('Unable to find Activity entity.');
}
@@ -106,9 +106,9 @@ final class ActivityController extends AbstractController
$this->logger->notice('An activity has been removed', [
'by_user' => $this->getUser()->getUserIdentifier(),
'activity_id' => $activity->getId(),
'person_id' => $activity->getPerson() ? $activity->getPerson()->getId() : null,
'comment' => $activity->getComment()->getComment(),
'scope_id' => $activity->getScope() ? $activity->getScope()->getId() : null,
'person_id' => null === $activity->getPerson() ? $activity->getPerson()->getId() : null,
'comment' => null === $activity->getComment()->getComment(),
'scope_id' => null === $activity->getScope() ? $activity->getScope()->getId() : null,
'reasons_ids' => $activity->getReasons()
->map(
static fn (ActivityReason $ar): int => $ar->getId()