Fix various phpstan errors.

This commit is contained in:
James Cole
2023-11-01 18:45:15 +01:00
parent 4ee3c7d83e
commit 3b4b074bae
14 changed files with 49 additions and 66 deletions

View File

@@ -123,7 +123,7 @@ class ExchangeRateConverter
}
app('log')->debug(sprintf('Going to get rate #%d->#%d (%s) from DB.', $from, $to, $date));
/** @var CurrencyExchangeRate $result */
/** @var CurrencyExchangeRate|null $result */
$result = auth()->user()
->currencyExchangeRates()
->where('from_currency_id', $from)

View File

@@ -78,7 +78,7 @@ trait ChecksLogin
/** @var User $user */
$user = auth()->user();
app('log')->debug('Now in getUserGroup()');
/** @var UserGroup $userGroup */
/** @var UserGroup|null $userGroup */
$userGroup = $this->route()->parameter('userGroup');
if (null === $userGroup) {
app('log')->debug('Request class has no userGroup parameter, but perhaps there is a parameter.');