mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Fixed some issues detected by PHPstan.
This commit is contained in:
parent
f2ff77a8b3
commit
dd1f806c4e
30 changed files with 310 additions and 45 deletions
|
@ -64,13 +64,13 @@ class ShowEventLogCommand extends Command
|
|||
|
||||
$onePage = $input->getOption('onePage');
|
||||
|
||||
$desc = $input->getOption('oldest_first');
|
||||
$limit = $input->getOption('count');
|
||||
$page = $input->getOption('page');
|
||||
$desc = (bool) $input->getOption('oldest_first');
|
||||
$limit = (int) $input->getOption('count');
|
||||
$page = (int) $input->getOption('page');
|
||||
$showExtra = $input->getOption('showExtra');
|
||||
|
||||
$total_count = $this->repo->count([]);
|
||||
$max_page = ceil($total_count / $limit);
|
||||
$max_page = (int) ceil($total_count / $limit);
|
||||
|
||||
if ($page > $max_page) {
|
||||
$io->error("There is no page ${page}! The maximum page is ${max_page}.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue