mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Replace phpstan suggestions
This commit is contained in:
@@ -377,7 +377,7 @@ class CreateRecurringTransactions implements ShouldQueue
|
||||
}
|
||||
|
||||
if ($journalCount > 0 && true === $this->force) {
|
||||
Log::warning(sprintf('Already created %d groups for date %s but FORCED to continue.', $journalCount, $date->format('Y-m-d')));
|
||||
app('log')->warning(sprintf('Already created %d groups for date %s but FORCED to continue.', $journalCount, $date->format('Y-m-d')));
|
||||
}
|
||||
|
||||
// create transaction array and send to factory.
|
||||
|
||||
@@ -114,13 +114,13 @@ class DownloadExchangeRates implements ShouldQueue
|
||||
$res = $client->get($url);
|
||||
$statusCode = $res->getStatusCode();
|
||||
if (200 !== $statusCode) {
|
||||
Log::warning(sprintf('Trying to grab "%s" resulted in status code %d.', $url, $statusCode));
|
||||
app('log')->warning(sprintf('Trying to grab "%s" resulted in status code %d.', $url, $statusCode));
|
||||
return;
|
||||
}
|
||||
$body = (string) $res->getBody();
|
||||
$json = json_decode($body, true);
|
||||
if (false === $json || null === $json) {
|
||||
Log::warning(sprintf('Trying to grab "%s" resulted in bad JSON.', $url));
|
||||
app('log')->warning(sprintf('Trying to grab "%s" resulted in bad JSON.', $url));
|
||||
return;
|
||||
}
|
||||
$date = Carbon::createFromFormat('Y-m-d', $json['date']);
|
||||
|
||||
Reference in New Issue
Block a user