Skip to content

Commit

Permalink
[TASK] Fix PHPStan validation
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabRecht authored and mschwemer committed Mar 7, 2025
1 parent 2c49b53 commit a7b2d1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Controller/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public function listAction(): ResponseInterface
$formUids = $this->mailRepository->findGroupedFormUidsToGivenPageUid((int)$this->id);
$mails = $this->mailRepository->findAllInPid((int)$this->id, $this->settings, $this->piVars);

$currentPage = (int)($this->request->getParsedBody()['currentPage'] ?? $this->request->getQueryParams()['currentPage'] ?? 1);
$parsedBody = $this->request->getParsedBody() ?? [];
assert(is_array($parsedBody));
$currentPage = (int)($parsedBody['currentPage'] ?? $this->request->getQueryParams()['currentPage'] ?? 1);
$currentPage = $currentPage > 0 ? $currentPage : 1;

$itemsPerPage = (int)($this->settings['perPage'] ?? 10);
Expand Down

0 comments on commit a7b2d1c

Please sign in to comment.