Auto commit for release 'develop' on 2025-01-26

This commit is contained in:
github-actions
2025-01-26 14:33:19 +01:00
parent 8a6eaad2bb
commit 5e15747a5b
35 changed files with 609 additions and 612 deletions

View File

@@ -50,7 +50,7 @@ class AccountTransformer extends AbstractTransformer
$this->parameters = new ParameterBag();
$this->repository = app(AccountRepositoryInterface::class);
$this->convertToNative = Amount::convertToNative();
$this->native = Amount::getNativeCurrency();
$this->native = Amount::getNativeCurrency();
}
/**
@@ -72,7 +72,7 @@ class AccountTransformer extends AbstractTransformer
$convertToNative = Amount::convertToNative();
// get account role (will only work if the type is asset).
$native = Amount::getNativeCurrency();
$native = Amount::getNativeCurrency();
$accountRole = $this->getAccountRole($account, $accountType);
$date = $this->getDate();
$date->endOfDay();
@@ -82,7 +82,7 @@ class AccountTransformer extends AbstractTransformer
[$openingBalance, $nativeOpeningBalance, $openingBalanceDate] = $this->getOpeningBalance($account, $accountType, $convertToNative);
[$interest, $interestPeriod] = $this->getInterest($account, $accountType);
$native = $this->native;
$native = $this->native;
if (!$this->convertToNative) {
// reset native currency to NULL, not interesting.
$native = null;

View File

@@ -50,21 +50,21 @@ class AttachmentTransformer extends AbstractTransformer
$this->repository->setUser($attachment->user);
return [
'id' => (string) $attachment->id,
'created_at' => $attachment->created_at->toAtomString(),
'updated_at' => $attachment->updated_at->toAtomString(),
'attachable_id' => (string) $attachment->attachable_id,
'attachable_type' => str_replace('FireflyIII\Models\\', '', $attachment->attachable_type),
'md5' => $attachment->md5,
'id' => (string) $attachment->id,
'created_at' => $attachment->created_at->toAtomString(),
'updated_at' => $attachment->updated_at->toAtomString(),
'attachable_id' => (string) $attachment->attachable_id,
'attachable_type' => str_replace('FireflyIII\Models\\', '', $attachment->attachable_type),
'md5' => $attachment->md5,
'hash' => $attachment->md5,
'filename' => $attachment->filename,
'download_url' => route('api.v1.attachments.download', [$attachment->id]),
'upload_url' => route('api.v1.attachments.upload', [$attachment->id]),
'title' => $attachment->title,
'notes' => $this->repository->getNoteText($attachment),
'mime' => $attachment->mime,
'size' => (int) $attachment->size,
'links' => [
'filename' => $attachment->filename,
'download_url' => route('api.v1.attachments.download', [$attachment->id]),
'upload_url' => route('api.v1.attachments.upload', [$attachment->id]),
'title' => $attachment->title,
'notes' => $this->repository->getNoteText($attachment),
'mime' => $attachment->mime,
'size' => (int) $attachment->size,
'links' => [
[
'rel' => 'self',
'uri' => '/attachment/'.$attachment->id,

View File

@@ -95,7 +95,6 @@ class CategoryTransformer extends AbstractTransformer
];
}
private function beautify(array $array): array
{
$return = [];

View File

@@ -56,4 +56,3 @@ class CurrencyTransformer extends AbstractTransformer
];
}
}