Add strict types, add debug info

This commit is contained in:
James Cole
2022-07-16 09:25:10 +02:00
parent 5c3b4d1663
commit 9493046212
38 changed files with 222 additions and 86 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* DownloadExchangeRates.php
* Copyright (c) 2022 james@firefly-iii.org
@@ -77,6 +78,7 @@ class DownloadExchangeRates implements ShouldQueue
*/
public function handle(): void
{
Log::debug('Now in handle()');
$currencies = $this->repository->get();
/** @var TransactionCurrency $currency */
@@ -108,7 +110,7 @@ class DownloadExchangeRates implements ShouldQueue
$res = $client->get($url);
$statusCode = $res->getStatusCode();
if (200 !== $statusCode) {
Log::warning(sprintf('Trying to grab "%s" resulted in %d.', $url, $statusCode));
Log::warning(sprintf('Trying to grab "%s" resulted in status code %d.', $url, $statusCode));
return;
}
$body = (string) $res->getBody();