Import statements and update configuration.

This commit is contained in:
James Cole
2025-05-27 16:57:36 +02:00
parent 7c04c4c2bc
commit c074fec0a7
165 changed files with 530 additions and 335 deletions

View File

@@ -37,6 +37,8 @@ use Illuminate\Support\Facades\Storage;
use Illuminate\Support\MessageBag;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use const DIRECTORY_SEPARATOR;
/**
* Class AttachmentHelper.
*/
@@ -85,7 +87,7 @@ class AttachmentHelper implements AttachmentHelperInterface
*/
public function getAttachmentLocation(Attachment $attachment): string
{
return sprintf('%sat-%d.data', \DIRECTORY_SEPARATOR, $attachment->id);
return sprintf('%sat-%d.data', DIRECTORY_SEPARATOR, $attachment->id);
}
/**

View File

@@ -30,13 +30,14 @@ use FireflyIII\Support\Facades\Steam;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Override;
/**
* Trait AccountCollection
*/
trait AccountCollection
{
#[\Override]
#[Override]
public function accountBalanceIs(string $direction, string $operator, string $value): GroupCollectorInterface
{
Log::warning(sprintf('GroupCollector will be SLOW: accountBalanceIs: "%s" "%s" "%s"', $direction, $operator, $value));

View File

@@ -45,6 +45,8 @@ use Illuminate\Database\Query\JoinClause;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Closure;
use Override;
/**
* Class GroupCollector
@@ -582,7 +584,7 @@ class GroupCollector implements GroupCollectorInterface
$result['date']->setTimezone(config('app.timezone'));
$result['created_at']->setTimezone(config('app.timezone'));
$result['updated_at']->setTimezone(config('app.timezone'));
} catch (\Exception $e) { // intentional generic exception
} catch (Exception $e) { // intentional generic exception
app('log')->error($e->getMessage());
throw new FireflyException($e->getMessage(), 0, $e);
@@ -778,7 +780,7 @@ class GroupCollector implements GroupCollectorInterface
app('log')->debug(sprintf('GroupCollector: postFilterCollection has %d filter(s) and %d transaction(s).', count($this->postFilters), count($currentCollection)));
/**
* @var \Closure $function
* @var Closure $function
*/
foreach ($this->postFilters as $function) {
app('log')->debug('Applying filter...');
@@ -812,7 +814,7 @@ class GroupCollector implements GroupCollectorInterface
return $currentCollection;
}
#[\Override]
#[Override]
public function sortCollection(Collection $collection): Collection
{
/**
@@ -1004,7 +1006,7 @@ class GroupCollector implements GroupCollectorInterface
return $this;
}
#[\Override]
#[Override]
public function setSorting(array $instructions): GroupCollectorInterface
{
$this->sorting = $instructions;

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Helpers\Webhook;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\WebhookMessage;
use JsonException;
/**
* Class Sha3SignatureGenerator
@@ -47,7 +48,7 @@ class Sha3SignatureGenerator implements SignatureGeneratorInterface
try {
$json = \Safe\json_encode($message->message, JSON_THROW_ON_ERROR);
} catch (\JsonException $e) {
} catch (JsonException $e) {
app('log')->error('Could not generate hash.');
app('log')->error(sprintf('JSON value: %s', $json));
app('log')->error($e->getMessage());