refactor: fix some of phpstan's ignored errors

This commit is contained in:
Yassine Doghri 2023-06-13 16:05:02 +00:00
commit 4c1a3e5015
67 changed files with 450 additions and 361 deletions

View file

@ -24,9 +24,8 @@ class PageController extends BaseController
throw PageNotFoundException::forPageNotFound();
}
if (
($page = (new PageModel())->where('slug', $params[0])->first()) === null
) {
$page = (new PageModel())->where('slug', $params[0])->first();
if (! $page instanceof Page) {
throw PageNotFoundException::forPageNotFound();
}