Fix phpstan reported errors

This commit is contained in:
DariusIII
2026-02-10 16:16:29 +01:00
parent 11c9eaacab
commit c5e55dd562
188 changed files with 881 additions and 1010 deletions
+3 -2
View File
@@ -34,14 +34,15 @@ class GamesController extends BasePageController
$ordering = $games->getGamesOrdering();
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
$offset = ($page - 1) * config('nntmux.items_per_cover_page');
$rslt = $games->getGamesRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, '', $this->userdata->categoryexclusions);
$results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
$rslt = $games->getGamesRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, '', (array) $this->userdata->categoryexclusions);
$results = $this->paginate($rslt, $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
$title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
$genres = $gen->getGenres((string) GenreService::GAME_TYPE, true);
$tmpgnr = [];
foreach ($genres as $gn) {
/** @var \App\Models\Genre $gn */
$tmpgnr[$gn->id] = $gn->title;
}