Fix various phpstan issues.

This commit is contained in:
James Cole
2023-11-04 07:18:03 +01:00
parent dc45131f73
commit ef428a0226
42 changed files with 104 additions and 174 deletions

View File

@@ -53,7 +53,7 @@ class AccountRepository implements AccountRepositoryInterface
app('log')->debug(sprintf('Searching for account named "%s" (of user #%d) of the following type(s)', $name, $this->user->id), ['types' => $types]);
$query->where('accounts.name', $name);
/** @var Account $account */
/** @var Account|null $account */
$account = $query->first(['accounts.*']);
if (null === $account) {
app('log')->debug(sprintf('There is no account with name "%s" of types', $name), $types);