Skip to content

Firefly III: a personal finances manager

🤖 Auto commit for release 'develop' on 2026-03-04

JC5773e2ac26204
diff --git a/app/Api/V1/Controllers/Models/Account/ListController.php b/app/Api/V1/Controllers/Models/Account/ListController.php
index 42fa092486..679b72293f 100644
--- a/app/Api/V1/Controllers/Models/Account/ListController.php
+++ b/app/Api/V1/Controllers/Models/Account/ListController.php
@@ -70,21 +70,21 @@ final class ListController extends Controller
public function attachments(PaginationRequest $request, Account $account): JsonResponse
{
- $manager = $this->getManager();
- ['limit' => $limit, 'offset' => $offset, 'page' => $page] = $request->attributes->all();
- $collection = $this->repository->getAttachments($account);
+ $manager = $this->getManager();
+ ['limit' => $limit, 'offset' => $offset, 'page' => $page] = $request->attributes->all();
+ $collection = $this->repository->getAttachments($account);
- $count = $collection->count();
- $attachments = $collection->slice($offset, $limit);
+ $count = $collection->count();
+ $attachments = $collection->slice($offset, $limit);
// make paginator:
- $paginator = new LengthAwarePaginator($attachments, $count, $limit, $page);
- $paginator->setPath(route('api.v1.accounts.attachments', [$account->id]) . $this->buildParams());
+ $paginator = new LengthAwarePaginator($attachments, $count, $limit, $page);
+ $paginator->setPath(route('api.v1.accounts.attachments', [$account->id]).$this->buildParams());
/** @var AttachmentTransformer $transformer */
- $transformer = app(AttachmentTransformer::class);
+ $transformer = app(AttachmentTransformer::class);
- $resource = new FractalCollection($attachments, $transformer, 'attachments');
+ $resource = new FractalCollection($attachments, $transformer, 'attachments');
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
@@ -93,31 +93,31 @@ final class ListController extends Controller
public function piggyBanks(PaginationRequest $request, Account $account): JsonResponse
{
// create some objects:
- $manager = $this->getManager();
+ $manager = $this->getManager();
- ['limit' => $limit, 'offset' => $offset, 'page' => $page] = $request->attributes->all();
+ ['limit' => $limit, 'offset' => $offset, 'page' => $page] = $request->attributes->all();
// get list of piggy banks. Count it and split it.
- $collection = $this->repository->getPiggyBanks($account);
- $count = $collection->count();
- $piggyBanks = $collection->slice($offset, $limit);
+ $collection = $this->repository->getPiggyBanks($account);
+ $count = $collection->count();
+ $piggyBanks = $collection->slice($offset, $limit);
// enrich
/** @var User $admin */
- $admin = auth()->user();
- $enrichment = new PiggyBankEnrichment();
+ $admin = auth()->user();
+ $enrichment = new PiggyBankEnrichment();
$enrichment->setUser($admin);
- $piggyBanks = $enrichment->enrich($piggyBanks);
+ $piggyBanks = $enrichment->enrich($piggyBanks);
// make paginator:
- $paginator = new LengthAwarePaginator($piggyBanks, $count, $limit, $page);
- $paginator->setPath(route('api.v1.accounts.piggy-banks', [$account->id]) . $this->buildParams());
+ $paginator = new LengthAwarePaginator($piggyBanks, $count, $limit, $page);
+ $paginator->setPath(route('api.v1.accounts.piggy-banks', [$account->id]).$this->buildParams());
/** @var PiggyBankTransformer $transformer */
- $transformer = app(PiggyBankTransformer::class);
+ $transformer = app(PiggyBankTransformer::class);
// $transformer->setParameters($this->parameters);
- $resource = new FractalCollection($piggyBanks, $transformer, 'piggy-banks');
+ $resource = new FractalCollection($piggyBanks, $transformer, 'piggy-banks');
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
@@ -128,16 +128,16 @@ final class ListController extends Controller
*/
public function transactions(PaginationDateRangeRequest $request, Account $account): JsonResponse
{
- ['limit' => $limit, 'page' => $page, 'start' => $start, 'end' => $end, 'type' => $type] = $request->attributes->all();
- $types = $this->mapTransactionTypes($type ?? 'default');
- $manager = $this->getManager();
+ ['limit' => $limit, 'page' => $page, 'start' => $start, 'end' => $end, 'type' => $type] = $request->attributes->all();
+ $types = $this->mapTransactionTypes($type ?? 'default');
+ $manager = $this->getManager();
/** @var User $admin */
- $admin = auth()->user();
+ $admin = auth()->user();
// use new group collector:
/** @var GroupCollectorInterface $collector */
- $collector = app(GroupCollectorInterface::class);
+ $collector = app(GroupCollectorInterface::class);
$collector->setUser($admin)->setAccounts(new Collection()->push($account))->withAPIInformation()->setLimit($limit)->setPage($page)->setTypes($types);
if (null !== $start) {
$collector->setStart($start);
@@ -146,18 +146,18 @@ final class ListController extends Controller
$collector->setEnd($end);
}
- $paginator = $collector->getPaginatedGroups();
- $paginator->setPath(route('api.v1.accounts.transactions', [$account->id]) . $this->buildParams());
+ $paginator = $collector->getPaginatedGroups();
+ $paginator->setPath(route('api.v1.accounts.transactions', [$account->id]).$this->buildParams());
// enrich
- $enrichment = new TransactionGroupEnrichment();
+ $enrichment = new TransactionGroupEnrichment();
$enrichment->setUser($admin);
- $transactions = $enrichment->enrich($paginator->getCollection());
+ $transactions = $enrichment->enrich($paginator->getCollection());
/** @var TransactionGroupTransformer $transformer */
- $transformer = app(TransactionGroupTransformer::class);
+ $transformer = app(TransactionGroupTransformer::class);
- $resource = new FractalCollection($transactions, $transformer, 'transactions');
+ $resource = new FractalCollection($transactions, $transformer, 'transactions');
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
diff --git a/app/Api/V1/Requests/AggregateFormRequest.php b/app/Api/V1/Requests/AggregateFormRequest.php
index 3d80afa2bf..5398623a2b 100644
--- a/app/Api/V1/Requests/AggregateFormRequest.php
+++ b/app/Api/V1/Requests/AggregateFormRequest.php
@@ -44,9 +44,8 @@ abstract class AggregateFormRequest extends ApiRequest
array $cookies = [],
array $files = [],
array $server = [],
- $content = null
- ): void
- {
+ $content = null
+ ): void {
parent::initialize($query, $request, $attributes, $cookies, $files, $server, $content);
// instantiate all subrequests and share current requests' bags with them
@@ -54,7 +53,7 @@ abstract class AggregateFormRequest extends ApiRequest
/** @var array|string $config */
foreach ($this->getRequests() as $config) {
- $requestClass = is_array($config) ? array_shift($config) : $config;
+ $requestClass = is_array($config) ? array_shift($config) : $config;
if (!is_a($requestClass, Request::class, true)) {
throw new RuntimeException('getRequests() must return class-strings of subclasses of Request');
@@ -84,7 +83,7 @@ abstract class AggregateFormRequest extends ApiRequest
// check all subrequests for rules and combine them
return array_reduce(
$this->requests,
- static fn(array $rules, FormRequest $request): array => $rules + (method_exists($request, 'rules') ? $request->rules() : []),
+ static fn (array $rules, FormRequest $request): array => $rules + (method_exists($request, 'rules') ? $request->rules() : []),
[]
);
}
diff --git a/app/Console/Commands/Upgrade/UpgradesToGroups.php b/app/Console/Commands/Upgrade/UpgradesToGroups.php
index a9d39c6020..0981af55b4 100644
--- a/app/Console/Commands/Upgrade/UpgradesToGroups.php
+++ b/app/Console/Commands/Upgrade/UpgradesToGroups.php
@@ -86,7 +86,7 @@ class UpgradesToGroups extends Command
private function findOpposingTransaction(TransactionJournal $journal, Transaction $transaction): ?Transaction
{
$set = $journal->transactions->filter(static function (Transaction $subject) use ($transaction): bool {
- $amount = (((float) $transaction->amount) * -1) === (float) $subject->amount; // intentional float
+ $amount = ((float) $transaction->amount * -1) === (float) $subject->amount; // intentional float
$identifier = $transaction->identifier === $subject->identifier;
Log::debug(sprintf('Amount the same? %s', var_export($amount, true)));
Log::debug(sprintf('ID the same? %s', var_export($identifier, true)));
diff --git a/app/Handlers/Observer/DeletedAccountObserver.php b/app/Handlers/Observer/DeletedAccountObserver.php
index 048400896d..c7abaee87c 100644
--- a/app/Handlers/Observer/DeletedAccountObserver.php
+++ b/app/Handlers/Observer/DeletedAccountObserver.php
@@ -57,7 +57,8 @@ class DeletedAccountObserver
$groupIds = TransactionJournal::whereIn('id', $journalIds)
->get(['transaction_journals.transaction_group_id'])
->pluck('transaction_group_id')
- ->toArray();
+ ->toArray()
+ ;
if (count($journalIds) > 0) {
Transaction::whereIn('transaction_journal_id', $journalIds)->delete();
diff --git a/app/Helpers/Collector/Extensions/AttachmentCollection.php b/app/Helpers/Collector/Extensions/AttachmentCollection.php
index e8e94d0749..cc5e024eaa 100644
--- a/app/Helpers/Collector/Extensions/AttachmentCollection.php
+++ b/app/Helpers/Collector/Extensions/AttachmentCollection.php
@@ -273,7 +273,7 @@ trait AttachmentCollection
/** @var null|Attachment $object */
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if('' !== $notes && $notes === $value) {
+ if ('' !== $notes && $notes === $value) {
return true;
}
}
@@ -298,7 +298,7 @@ trait AttachmentCollection
/** @var null|Attachment $object */
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if('' !== $notes && $notes !== $value) {
+ if ('' !== $notes && $notes !== $value) {
return true;
}
}
@@ -323,7 +323,7 @@ trait AttachmentCollection
/** @var null|Attachment $object */
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if( '' !== $notes && str_contains(strtolower($notes), strtolower($value))) {
+ if ('' !== $notes && str_contains(strtolower($notes), strtolower($value))) {
return true;
}
}
@@ -348,7 +348,7 @@ trait AttachmentCollection
/** @var null|Attachment $object */
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if('' !== $notes && !str_contains(strtolower($notes), strtolower($value))) {
+ if ('' !== $notes && !str_contains(strtolower($notes), strtolower($value))) {
return true;
}
}
@@ -374,7 +374,7 @@ trait AttachmentCollection
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if('' !== $notes && !str_ends_with(strtolower($notes), strtolower($value))) {
+ if ('' !== $notes && !str_ends_with(strtolower($notes), strtolower($value))) {
return true;
}
}
@@ -399,7 +399,7 @@ trait AttachmentCollection
/** @var null|Attachment $object */
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if('' !== $notes && !str_starts_with(strtolower($notes), strtolower($value))) {
+ if ('' !== $notes && !str_starts_with(strtolower($notes), strtolower($value))) {
return true;
}
}
@@ -424,7 +424,7 @@ trait AttachmentCollection
/** @var null|Attachment $object */
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if('' !== $notes && str_ends_with(strtolower($notes), strtolower($value))) {
+ if ('' !== $notes && str_ends_with(strtolower($notes), strtolower($value))) {
return true;
}
}
@@ -449,7 +449,7 @@ trait AttachmentCollection
/** @var null|Attachment $object */
$object = auth()->user()->attachments()->find($attachment['id']);
$notes = (string) $object?->notes()->first()?->text;
- if('' !== $notes && str_starts_with(strtolower($notes), strtolower($value))) {
+ if ('' !== $notes && str_starts_with(strtolower($notes), strtolower($value))) {
return true;
}
}
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php
index b80c3826d9..d9d00cd6ea 100644
--- a/app/Helpers/Collector/GroupCollector.php
+++ b/app/Helpers/Collector/GroupCollector.php
@@ -283,10 +283,11 @@ class GroupCollector implements GroupCollectorInterface
}
echo $query;
- die(PHP_EOL. 'To see the query, uncomment the next lines first.');
-// echo '<pre>';
-// print_r($this->query->getBindings());
-// echo '</pre>';
+ exit(PHP_EOL.'To see the query, uncomment the next lines first.');
+
+ // echo '<pre>';
+ // print_r($this->query->getBindings());
+ // echo '</pre>';
}
public function dumpQueryInLogs(): void
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 6c45ba5a45..bd1595531c 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -278,7 +278,7 @@ final class LoginController extends Controller
if ($response) {
return $response;
}
- $path = Steam::getSafeUrl(session()->pull('url.intended', route('index')), route('index'));
+ $path = Steam::getSafeUrl(session()->pull('url.intended', route('index')), route('index'));
Log::debug(sprintf('SafeURL is %s', $path));
return $request->wantsJson() ? new JsonResponse([], 204) : redirect()->to($path);
diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php
index fd77a6625f..215adfae22 100644
--- a/app/Http/Controllers/DebugController.php
+++ b/app/Http/Controllers/DebugController.php
@@ -195,7 +195,7 @@ final class DebugController extends Controller
}
// no name route:
if (null === $route->getName()) {
- die('Route name is NULL, cannot deal with this.');
+ exit('Route name is NULL, cannot deal with this.');
}
echo substr($route->uri(), 3);
@@ -234,7 +234,7 @@ final class DebugController extends Controller
}
// no name route:
if (null === $route->getName()) {
- die('Route name is NULL, cannot deal with this.');
+ exit('Route name is NULL, cannot deal with this.');
}
if (!str_contains($route->uri(), '{')) {
$return[$route->getName()] = route($route->getName());
diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php
index 5395ae2245..8562fe89b8 100644
--- a/app/Http/Middleware/Authenticate.php
+++ b/app/Http/Middleware/Authenticate.php
@@ -97,34 +97,35 @@ class Authenticate
throw new AuthenticationException('The user is not logged in but must be.', $guards);
}
}
+
throw new FireflyException('This point is generally unreachable.');
-//
-// exit('five');
-// foreach ($guards as $guard) {
-// exit('six');
-// if ('api' !== $guard) {
-// $this->auth->guard($guard)->authenticate();
-// }
-// $result = $this->auth->guard($guard)->check();
-// if ($result) {
-// $user = $this->auth->guard($guard)->user();
-// $this->validateBlockedUser($user, $guards);
-//
-// // According to PHPstan the method returns void, but we'll see.
-// return $this->auth->shouldUse($guard);
-// }
-// }
-//
-// exit('seven');
+ //
+ // exit('five');
+ // foreach ($guards as $guard) {
+ // exit('six');
+ // if ('api' !== $guard) {
+ // $this->auth->guard($guard)->authenticate();
+ // }
+ // $result = $this->auth->guard($guard)->check();
+ // if ($result) {
+ // $user = $this->auth->guard($guard)->user();
+ // $this->validateBlockedUser($user, $guards);
+ //
+ // // According to PHPstan the method returns void, but we'll see.
+ // return $this->auth->shouldUse($guard);
+ // }
+ // }
+ //
+ // exit('seven');
// this is a massive hack, but if the handler has the oauth exception
// at this point we can report its error instead of a generic one.
-// $message = 'Unauthenticated.';
-// if (Handler::$lastError instanceof OAuthServerException) {
-// $message = Handler::$lastError->getHint();
-// }
-//
-// throw new AuthenticationException($message, $guards);
+ // $message = 'Unauthenticated.';
+ // if (Handler::$lastError instanceof OAuthServerException) {
+ // $message = Handler::$lastError->getHint();
+ // }
+ //
+ // throw new AuthenticationException($message, $guards);
}
/**
diff --git a/app/Listeners/Security/User/NotifiesUserAboutNewIpAddress.php b/app/Listeners/Security/User/NotifiesUserAboutNewIpAddress.php
index e205a02b62..6c79e9e459 100644
--- a/app/Listeners/Security/User/NotifiesUserAboutNewIpAddress.php
+++ b/app/Listeners/Security/User/NotifiesUserAboutNewIpAddress.php
@@ -40,7 +40,7 @@ class NotifiesUserAboutNewIpAddress implements ShouldQueue
return; // do not email demo user.
}
- /** @var array|null $list */
+ /** @var null|array $list */
$list = Preferences::getForUser($user, 'login_ip_history', [])->data;
if (!is_array($list)) {
$list = [];
diff --git a/app/Models/Account.php b/app/Models/Account.php
index 4fd1786ddb..c202a35c60 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -81,7 +81,6 @@ class Account extends Model
throw new NotFoundHttpException();
}
-
public function accountMeta(): HasMany
{
return $this->hasMany(AccountMeta::class);
diff --git a/app/Repositories/Category/NoCategoryRepository.php b/app/Repositories/Category/NoCategoryRepository.php
index 868de47868..4567d08d68 100644
--- a/app/Repositories/Category/NoCategoryRepository.php
+++ b/app/Repositories/Category/NoCategoryRepository.php
@@ -85,8 +85,12 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface, UserGroupIn
'currency_code' => (string) $journal['currency_code'],
'currency_decimal_places' => (int) $journal['currency_decimal_places'],
'foreign_currency_id' => (int) ($journal['foreign_currency_id'] ?? 0),
- 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount'] ? Steam::negative((string) $journal['foreign_amount']) : null,
- 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount'] ? Steam::negative((string) $journal['pc_amount']) : null,
+ 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount']
+ ? Steam::negative((string) $journal['foreign_amount'])
+ : null,
+ 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount']
+ ? Steam::negative((string) $journal['pc_amount'])
+ : null,
'date' => $journal['date'],
];
}
@@ -139,8 +143,12 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface, UserGroupIn
'currency_code' => (string) $journal['currency_code'],
'currency_decimal_places' => (int) $journal['currency_decimal_places'],
'foreign_currency_id' => (int) ($journal['foreign_currency_id'] ?? 0),
- 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount'] ? Steam::positive((string) $journal['foreign_amount']) : null,
- 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount'] ? Steam::positive((string) $journal['pc_amount']) : null,
+ 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount']
+ ? Steam::positive((string) $journal['foreign_amount'])
+ : null,
+ 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount']
+ ? Steam::positive((string) $journal['pc_amount'])
+ : null,
'date' => $journal['date'],
];
}
diff --git a/app/Repositories/Category/OperationsRepository.php b/app/Repositories/Category/OperationsRepository.php
index ea20e0c815..5d7b2ce6ae 100644
--- a/app/Repositories/Category/OperationsRepository.php
+++ b/app/Repositories/Category/OperationsRepository.php
@@ -159,8 +159,12 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
'currency_code' => (string) $journal['currency_code'],
'currency_decimal_places' => (int) $journal['currency_decimal_places'],
'foreign_currency_id' => (int) ($journal['foreign_currency_id'] ?? 0),
- 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount'] ? Steam::negative((string) $journal['foreign_amount']) : null,
- 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount'] ? Steam::negative((string) $journal['pc_amount']) : null,
+ 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount']
+ ? Steam::negative((string) $journal['foreign_amount'])
+ : null,
+ 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount']
+ ? Steam::negative((string) $journal['pc_amount'])
+ : null,
'date' => $journal['date'],
'source_account_id' => (string) $journal['source_account_id'],
'budget_name' => $journal['budget_name'],
@@ -237,8 +241,12 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
'currency_code' => (string) $journal['currency_code'],
'currency_decimal_places' => (int) $journal['currency_decimal_places'],
'foreign_currency_id' => (int) ($journal['foreign_currency_id'] ?? 0),
- 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount'] ? Steam::positive((string) $journal['foreign_amount']) : null,
- 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount'] ? Steam::positive((string) $journal['pc_amount']) : null,
+ 'foreign_amount' => array_key_exists('foreign_amount', $journal) && null !== $journal['foreign_amount']
+ ? Steam::positive((string) $journal['foreign_amount'])
+ : null,
+ 'pc_amount' => array_key_exists('pc_amount', $journal) && null !== $journal['pc_amount']
+ ? Steam::positive((string) $journal['pc_amount'])
+ : null,
'date' => $journal['date'],
'source_account_id' => (string) $journal['source_account_id'],
'destination_account_id' => (string) $journal['destination_account_id'],
diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php
index 055a95b782..caf0cd61c0 100644
--- a/app/Repositories/Journal/JournalRepository.php
+++ b/app/Repositories/Journal/JournalRepository.php
@@ -40,6 +40,7 @@ use FireflyIII\Support\Repositories\UserGroup\UserGroupInterface;
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
use Illuminate\Support\Collection;
use Override;
+
use function Safe\json_encode;
/**
diff --git a/app/Repositories/PeriodStatistic/PeriodStatisticRepository.php b/app/Repositories/PeriodStatistic/PeriodStatisticRepository.php
index 61b5f419d3..9832e0b24d 100644
--- a/app/Repositories/PeriodStatistic/PeriodStatisticRepository.php
+++ b/app/Repositories/PeriodStatistic/PeriodStatisticRepository.php
@@ -54,7 +54,8 @@ class PeriodStatisticRepository implements PeriodStatisticRepositoryInterface, U
->where('type', 'LIKE', sprintf('%s%%', $prefix))
->where('start', '>=', $start)
->where('end', '<=', $end)
- ->get();
+ ->get()
+ ;
}
#[Override]
@@ -109,7 +110,8 @@ class PeriodStatisticRepository implements PeriodStatisticRepositoryInterface, U
}
})
->where('type', 'LIKE', sprintf('%s%%', $prefix))
- ->delete();
+ ->delete()
+ ;
Log::debug(sprintf('Deleted %d entries for prefix "%s"', $count, $prefix));
}
@@ -121,15 +123,16 @@ class PeriodStatisticRepository implements PeriodStatisticRepositoryInterface, U
return;
}
$count = PeriodStatistic::where('primary_statable_type', $class)
- ->whereIn('primary_statable_id', $objects->pluck('id')->toArray())
- ->where(function (Builder $q) use ($dates): void {
- foreach ($dates as $date) {
- $q->where(function (Builder $q1) use ($date): void {
- $q1->where('start', '<=', $date)->where('end', '>=', $date);
- });
- }
- })
- ->delete();
+ ->whereIn('primary_statable_id', $objects->pluck('id')->toArray())
+ ->where(function (Builder $q) use ($dates): void {
+ foreach ($dates as $date) {
+ $q->where(function (Builder $q1) use ($date): void {
+ $q1->where('start', '<=', $date)->where('end', '>=', $date);
+ });
+ }
+ })
+ ->delete()
+ ;
Log::debug(sprintf('Delete %d statistics for %dx %s', $count, $objects->count(), $class));
}
@@ -146,14 +149,13 @@ class PeriodStatisticRepository implements PeriodStatisticRepositoryInterface, U
#[Override]
public function savePrefixedStatistic(
string $prefix,
- int $currencyId,
+ int $currencyId,
Carbon $start,
Carbon $end,
string $type,
- int $count,
+ int $count,
string $amount
- ): PeriodStatistic
- {
+ ): PeriodStatistic {
Log::debug(sprintf('Store as type "%s"', sprintf('%s_%s', $prefix, $type)));
$stat = new PeriodStatistic();
$stat->transaction_currency_id = $currencyId;
@@ -168,22 +170,22 @@ class PeriodStatisticRepository implements PeriodStatisticRepositoryInterface, U
$stat->save();
Log::debug(sprintf(
- 'Saved #%d [currency #%d, type "%s", %s to %s, %d, %s] as new statistic.',
- $stat->id,
- $stat->transaction_currency_id,
- $stat->type,
- $stat->start->toW3cString(),
- $stat->end->toW3cString(),
- $count,
- $amount
- ));
+ 'Saved #%d [currency #%d, type "%s", %s to %s, %d, %s] as new statistic.',
+ $stat->id,
+ $stat->transaction_currency_id,
+ $stat->type,
+ $stat->start->toW3cString(),
+ $stat->end->toW3cString(),
+ $count,
+ $amount
+ ));
return $stat;
}
public function saveStatistic(Model $model, int $currencyId, Carbon $start, Carbon $end, string $type, int $count, string $amount): PeriodStatistic
{
- $stat = new PeriodStatistic();
+ $stat = new PeriodStatistic();
$stat->primaryStatable()->associate($model);
$stat->transaction_currency_id = $currencyId;
$stat->user_group_id = $this->getUserGroup()->id;
@@ -197,16 +199,16 @@ class PeriodStatisticRepository implements PeriodStatisticRepositoryInterface, U
$stat->save();
Log::debug(sprintf(
- 'Saved #%d [currency #%d, Model %s #%d, %s to %s, %d, %s] as new statistic.',
- $stat->id,
- $model::class,
- $model->id,
- $stat->transaction_currency_id,
- $stat->start->toW3cString(),
- $stat->end->toW3cString(),
- $count,
- $amount
- ));
+ 'Saved #%d [currency #%d, Model %s #%d, %s to %s, %d, %s] as new statistic.',
+ $stat->id,
+ $model::class,
+ $model->id,
+ $stat->transaction_currency_id,
+ $stat->start->toW3cString(),
+ $stat->end->toW3cString(),
+ $count,
+ $amount
+ ));
return $stat;
}
diff --git a/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php b/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
index 63a2b796b9..f4ab3d949c 100644
--- a/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
+++ b/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
@@ -30,6 +30,7 @@ use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use Illuminate\Support\Facades\Log;
use Override;
+
use function Safe\file_get_contents;
use function Safe\json_decode;
diff --git a/app/Services/Internal/Support/CreditRecalculateService.php b/app/Services/Internal/Support/CreditRecalculateService.php
index 5871f052ac..088992f429 100644
--- a/app/Services/Internal/Support/CreditRecalculateService.php
+++ b/app/Services/Internal/Support/CreditRecalculateService.php
@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\Internal\Support;
use FireflyIII\Enums\TransactionTypeEnum;
-use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Factory\AccountMetaFactory;
use FireflyIII\Models\Account;
use FireflyIII\Models\Transaction;
@@ -132,6 +131,7 @@ class CreditRecalculateService
return $usedAmount;
}
+
/**
* case 4
* it's a deposit into this liability (from revenue account).
diff --git a/app/Services/Internal/Update/BillUpdateService.php b/app/Services/Internal/Update/BillUpdateService.php
index 2e41265593..0c46517c2e 100644
--- a/app/Services/Internal/Update/BillUpdateService.php
+++ b/app/Services/Internal/Update/BillUpdateService.php
@@ -28,14 +28,10 @@ use FireflyIII\Events\Model\Bill\UpdatedExistingBill;
use FireflyIII\Factory\TransactionCurrencyFactory;
use FireflyIII\Models\Bill;
use FireflyIII\Models\ObjectGroup;
-use FireflyIII\Models\Rule;
-use FireflyIII\Models\RuleTrigger;
use FireflyIII\Repositories\ObjectGroup\CreatesObjectGroups;
use FireflyIII\Services\Internal\Support\BillServiceTrait;
use FireflyIII\Support\Facades\Amount;
use FireflyIII\User;
-use Illuminate\Support\Collection;
-use Illuminate\Support\Facades\Log;
/**
* Class BillUpdateService
@@ -120,7 +116,6 @@ class BillUpdateService
return $bill;
}
-
/**
* @SuppressWarnings("PHPMD.NPathComplexity")
*/
diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php
index 99a0088f6d..d42f25e9ea 100644
--- a/app/Support/Authentication/RemoteUserGuard.php
+++ b/app/Support/Authentication/RemoteUserGuard.php
@@ -41,7 +41,7 @@ class RemoteUserGuard implements Guard
{
protected Application $application;
protected ?User $user = null;
- private bool $tried = false;
+ private bool $tried = false;
/**
* Create a new authentication guard.
diff --git a/app/Support/JsonApi/Enrichments/CategoryEnrichment.php b/app/Support/JsonApi/Enrichments/CategoryEnrichment.php
index a9523ae223..a9195ad015 100644
--- a/app/Support/JsonApi/Enrichments/CategoryEnrichment.php
+++ b/app/Support/JsonApi/Enrichments/CategoryEnrichment.php
@@ -36,18 +36,18 @@ use Illuminate\Support\Collection;
class CategoryEnrichment implements EnrichmentInterface
{
private Collection $collection;
- private array $earned = [];
- private ?Carbon $end = null;
- private array $ids = [];
- private array $notes = [];
- private array $pcEarned = [];
- private array $pcSpent = [];
- private array $pcTransfers = [];
- private array $spent = [];
- private ?Carbon $start = null;
- private array $transfers = [];
- private User $user;
- private UserGroup $userGroup;
+ private array $earned = [];
+ private ?Carbon $end = null;
+ private array $ids = [];
+ private array $notes = [];
+ private array $pcEarned = [];
+ private array $pcSpent = [];
+ private array $pcTransfers = [];
+ private array $spent = [];
+ private ?Carbon $start = null;
+ private array $transfers = [];
+ private User $user;
+ private UserGroup $userGroup;
public function enrich(Collection $collection): Collection
{
@@ -60,7 +60,7 @@ class CategoryEnrichment implements EnrichmentInterface
return $collection;
}
- public function enrichSingle(array | Model $model): array | Model
+ public function enrichSingle(array|Model $model): array|Model
{
// Log::debug(__METHOD__);
$collection = new Collection()->push($model);
@@ -93,7 +93,7 @@ class CategoryEnrichment implements EnrichmentInterface
private function appendCollectedData(): void
{
$this->collection = $this->collection->map(function (Category $item): Category {
- $id = (int)$item->id;
+ $id = (int) $item->id;
$meta = [
'notes' => $this->notes[$id] ?? null,
'spent' => $this->spent[$id] ?? null,
@@ -113,7 +113,7 @@ class CategoryEnrichment implements EnrichmentInterface
{
/** @var Category $category */
foreach ($this->collection as $category) {
- $this->ids[] = (int)$category->id;
+ $this->ids[] = (int) $category->id;
}
$this->ids = array_unique($this->ids);
}
@@ -121,14 +121,15 @@ class CategoryEnrichment implements EnrichmentInterface
private function collectNotes(): void
{
$notes = Note::query()
- ->whereIn('noteable_id', $this->ids)
- ->whereNotNull('notes.text')
- ->where('notes.text', '!=', '')
- ->where('noteable_type', Category::class)
- ->get(['notes.noteable_id', 'notes.text'])
- ->toArray();
+ ->whereIn('noteable_id', $this->ids)
+ ->whereNotNull('notes.text')
+ ->where('notes.text', '!=', '')
+ ->where('noteable_type', Category::class)
+ ->get(['notes.noteable_id', 'notes.text'])
+ ->toArray()
+ ;
foreach ($notes as $note) {
- $this->notes[(int)$note['noteable_id']] = (string)$note['text'];
+ $this->notes[(int) $note['noteable_id']] = (string) $note['text'];
}
// Log::debug(sprintf('Enrich with %d note(s)', count($this->notes)));
@@ -141,11 +142,11 @@ class CategoryEnrichment implements EnrichmentInterface
$opsRepository = app(OperationsRepositoryInterface::class);
$opsRepository->setUser($this->user);
$opsRepository->setUserGroup($this->userGroup);
- $expenses = $opsRepository->collectExpenses($this->start, $this->end, null, $this->collection);
- $income = $opsRepository->collectIncome($this->start, $this->end, null, $this->collection);
- $transfers = $opsRepository->collectTransfers($this->start, $this->end, null, $this->collection);
+ $expenses = $opsRepository->collectExpenses($this->start, $this->end, null, $this->collection);
+ $income = $opsRepository->collectIncome($this->start, $this->end, null, $this->collection);
+ $transfers = $opsRepository->collectTransfers($this->start, $this->end, null, $this->collection);
foreach ($this->collection as $item) {
- $id = (int)$item->id;
+ $id = (int) $item->id;
$this->spent[$id] = array_values($opsRepository->sumCollectedTransactionsByCategory($expenses, $item, 'negative'));
$this->pcSpent[$id] = array_values($opsRepository->sumCollectedTransactionsByCategory($expenses, $item, 'negative', true));
$this->earned[$id] = array_values($opsRepository->sumCollectedTransactionsByCategory($income, $item, 'positive'));
diff --git a/app/Support/Logging/AuditProcessor.php b/app/Support/Logging/AuditProcessor.php
index 309cf46766..f42c9ef016 100644
--- a/app/Support/Logging/AuditProcessor.php
+++ b/app/Support/Logging/AuditProcessor.php
@@ -46,13 +46,7 @@ class AuditProcessor
return new LogRecord($record->datetime, $record->channel, $record->level, $message, $record->context, $record->extra, $record->formatted);
}
- $message = sprintf(
- 'AUDIT: %s (%s -> %s:%s)',
- $record['message'],
- app('request')->ip(),
- request()->method(),
- request()->url()
- );
+ $message = sprintf('AUDIT: %s (%s -> %s:%s)', $record['message'], app('request')->ip(), request()->method(), request()->url());
return new LogRecord($record->datetime, $record->channel, $record->level, $message, $record->context, $record->extra, $record->formatted);
}
diff --git a/app/Support/Search/QueryParser/QueryParser.php b/app/Support/Search/QueryParser/QueryParser.php
index ce9cf4c8ee..9e6c3ea690 100644
--- a/app/Support/Search/QueryParser/QueryParser.php
+++ b/app/Support/Search/QueryParser/QueryParser.php
@@ -24,8 +24,8 @@ declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;
-
use SensitiveParameter;
+
use function Safe\preg_split;
/**
diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php
index 9a129baf23..8ef36e55d1 100644
--- a/app/Validation/FireflyValidator.php
+++ b/app/Validation/FireflyValidator.php
@@ -51,6 +51,7 @@ use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\JsonException;
use ValueError;
+
use function Safe\iconv;
use function Safe\json_encode;
use function Safe\preg_match;
@@ -78,7 +79,7 @@ class FireflyValidator extends Validator
if (!is_string($value) || 6 !== strlen($value)) {
return false;
}
- $user = auth()->user();
+ $user = auth()->user();
if (null === $user) {
Log::error('No user during validate2faCode');
@@ -89,9 +90,9 @@ class FireflyValidator extends Validator
if (is_array($secret)) {
$secret = '';
}
- $secret = (string)$secret;
+ $secret = (string) $secret;
- return (bool)Facade::verifyKey($secret, $value);
+ return (bool) Facade::verifyKey($secret, $value);
}
/**
@@ -105,13 +106,14 @@ class FireflyValidator extends Validator
{
$field = $parameters[1] ?? 'id';
- if (0 === (int)$value) {
+ if (0 === (int) $value) {
return true;
}
$count = DB::table($parameters[0])
- ->where('user_id', auth()->user()->id)
- ->where($field, $value)
- ->count();
+ ->where('user_id', auth()->user()->id)
+ ->where($field, $value)
+ ->count()
+ ;
return 1 === $count;
}
@@ -135,15 +137,15 @@ class FireflyValidator extends Validator
if (!is_string($value) || 6 !== strlen($value)) {
return false;
}
- $user = auth()->user();
+ $user = auth()->user();
if (null === $user) {
Log::error('No user during validate2faCode');
return false;
}
- $secret = (string)$user->mfa_secret;
+ $secret = (string) $user->mfa_secret;
- return (bool)Facade::verifyKey($secret, $value);
+ return (bool) Facade::verifyKey($secret, $value);
}
/**
@@ -250,10 +252,10 @@ class FireflyValidator extends Validator
];
// take
- $first = substr($value, 0, 4);
- $last = substr($value, 4);
- $iban = $last . $first;
- $iban = trim(str_replace($search, $replace, $iban));
+ $first = substr($value, 0, 4);
+ $last = substr($value, 4);
+ $iban = $last.$first;
+ $iban = trim(str_replace($search, $replace, $iban));
if ('' === $iban) {
return false;
}
@@ -268,7 +270,7 @@ class FireflyValidator extends Validator
return false;
}
- return 1 === (int)$checksum;
+ return 1 === (int) $checksum;
}
/**
@@ -283,7 +285,7 @@ class FireflyValidator extends Validator
/** @var mixed $compare */
$compare = $parameters[0] ?? '0';
- return bccomp((string)$value, (string)$compare) < 0;
+ return bccomp((string) $value, (string) $compare) < 0;
}
/**
@@ -298,7 +300,7 @@ class FireflyValidator extends Validator
/** @var mixed $compare */
$compare = $parameters[0] ?? '0';
- return bccomp((string)$value, (string)$compare) > 0;
+ return bccomp((string) $value, (string) $compare) > 0;
}
/**
@@ -312,7 +314,7 @@ class FireflyValidator extends Validator
{
$field = $parameters[1] ?? 'id';
- if (0 === (int)$value) {
+ if (0 === (int) $value) {
return true;
}
$count = DB::table($parameters[0])->where($field, $value)->count();
@@ -324,8 +326,8 @@ class FireflyValidator extends Validator
{
// first, get the index from this string:
$value ??= '';
- $parts = explode('.', $attribute);
- $index = (int)($parts[1] ?? '0');
+ $parts = explode('.', $attribute);
+ $index = (int) ($parts[1] ?? '0');
// get the name of the trigger from the data array:
$actionType = $this->data['actions'][$index]['type'] ?? 'invalid';
@@ -391,8 +393,8 @@ class FireflyValidator extends Validator
public function validateRuleTriggerValue(string $attribute, ?string $value = null): bool
{
// first, get the index from this string:
- $parts = explode('.', $attribute);
- $index = (int)($parts[1] ?? '0');
+ $parts = explode('.', $attribute);
+ $index = (int) ($parts[1] ?? '0');
// get the name of the trigger from the data array:
$triggerType = $this->data['triggers'][$index]['type'] ?? 'invalid';
@@ -403,14 +405,14 @@ class FireflyValidator extends Validator
}
// these trigger types need a numerical check:
- $numerical = ['amount_less', 'amount_more', 'amount_exactly'];
+ $numerical = ['amount_less', 'amount_more', 'amount_exactly'];
if (in_array($triggerType, $numerical, true)) {
return is_numeric($value);
}
// these triggers need just the word "true":
// TODO create a helper to automatically return these.
- $needTrue = [
+ $needTrue = [
'reconciled',
'has_attachments',
'has_any_category',
@@ -439,7 +441,7 @@ class FireflyValidator extends Validator
// these trigger types need a simple strlen check:
// TODO create a helper to automatically return these.
- $length = [
+ $length = [
'source_account_starts',
'source_account_ends',
'source_account_is',
@@ -468,13 +470,13 @@ class FireflyValidator extends Validator
// check if it's an existing account.
// TODO create a helper to automatically return these.
if (in_array($triggerType, ['destination_account_id', 'source_account_id'], true)) {
- return is_numeric($value) && (int)$value > 0;
+ return is_numeric($value) && (int) $value > 0;
}
// check transaction type.
// TODO create a helper to automatically return these.
if ('transaction_type' === $triggerType) {
- $count = TransactionType::where('type', ucfirst((string)$value))->count();
+ $count = TransactionType::where('type', ucfirst((string) $value))->count();
return 1 === $count;
}
@@ -505,10 +507,10 @@ class FireflyValidator extends Validator
*/
public function validateSecurePassword($attribute, ?string $value): bool
{
- $value = (string)$value;
+ $value = (string) $value;
$verify = false;
if (array_key_exists('verify_password', $this->data)) {
- $verify = 1 === (int)$this->data['verify_password'];
+ $verify = 1 === (int) $this->data['verify_password'];
}
if ($verify) {
/** @var Verifier $service */
@@ -548,7 +550,7 @@ class FireflyValidator extends Validator
if (array_key_exists('type', $this->data) && !is_array($this->data['type'])) {
Log::debug('validateUniqueAccountForUser::typeString');
- return $this->validateByAccountTypeString($value, $parameters, (string)$this->data['type']);
+ return $this->validateByAccountTypeString($value, $parameters, (string) $this->data['type']);
}
if (array_key_exists('account_type_id', $this->data)) {
Log::debug('validateUniqueAccountForUser::typeId');
@@ -559,7 +561,7 @@ class FireflyValidator extends Validator
if (null !== $parameterId) {
Log::debug('validateUniqueAccountForUser::paramId');
- return $this->validateByParameterId((int)$parameterId, $value);
+ return $this->validateByParameterId((int) $parameterId, $value);
}
if (array_key_exists('id', $this->data)) {
Log::debug('validateUniqueAccountForUser::accountId');
@@ -584,23 +586,24 @@ class FireflyValidator extends Validator
*/
public function validateUniqueAccountNumberForUser($attribute, $value, $parameters): bool
{
- $accountId = (int)($this->data['id'] ?? 0.0);
+ $accountId = (int) ($this->data['id'] ?? 0.0);
if (0 === $accountId) {
- $accountId = (int)($parameters[0] ?? 0.0);
+ $accountId = (int) ($parameters[0] ?? 0.0);
}
- $query = AccountMeta::leftJoin('accounts', 'accounts.id', '=', 'account_meta.account_id')
- ->whereNull('accounts.deleted_at')
- ->where('accounts.user_id', auth()->user()->id)
- ->where('account_meta.name', 'account_number')
- ->where('account_meta.data', json_encode($value));
+ $query = AccountMeta::leftJoin('accounts', 'accounts.id', '=', 'account_meta.account_id')
+ ->whereNull('accounts.deleted_at')
+ ->where('accounts.user_id', auth()->user()->id)
+ ->where('account_meta.name', 'account_number')
+ ->where('account_meta.data', json_encode($value))
+ ;
if ($accountId > 0) {
// exclude current account from check.
$query->where('account_meta.account_id', '!=', $accountId);
}
- $set = $query->get(['account_meta.*']);
- $count = $set->count();
+ $set = $query->get(['account_meta.*']);
+ $count = $set->count();
if (0 === $count) {
return true;
}
@@ -608,7 +611,7 @@ class FireflyValidator extends Validator
// pretty much impossible but still.
return false;
}
- $type = $this->data['objectType'] ?? 'unknown';
+ $type = $this->data['objectType'] ?? 'unknown';
if ('expense' !== $type && 'revenue' !== $type) {
Log::warning(sprintf('Account number "%s" is not unique and account type "%s" cannot share its account number.', $value, $type));
@@ -620,7 +623,7 @@ class FireflyValidator extends Validator
/** @var AccountMeta $entry */
foreach ($set as $entry) {
$otherAccount = $entry->account;
- $otherType = (string)config(sprintf('firefly.shortNamesByFullName.%s', $otherAccount->accountType->type));
+ $otherType = (string) config(sprintf('firefly.shortNamesByFullName.%s', $otherAccount->accountType->type));
if (('expense' === $otherType || 'revenue' === $otherType) && $otherType !== $type) {
Log::debug(sprintf('The other account with this account number is a "%s" so return true.', $otherType));
@@ -638,9 +641,10 @@ class FireflyValidator extends Validator
public function validateUniqueCurrency(string $field, string $attribute, string $value): bool
{
return 0 === DB::table('transaction_currencies')
- ->where($field, $value)
- ->whereNull('deleted_at')
- ->count();
+ ->where($field, $value)
+ ->whereNull('deleted_at')
+ ->count()
+ ;
}
/**
@@ -648,17 +652,17 @@ class FireflyValidator extends Validator
*/
public function validateUniqueCurrencyCode(?string $attribute, ?string $value): bool
{
- return $this->validateUniqueCurrency('code', (string)$attribute, (string)$value);
+ return $this->validateUniqueCurrency('code', (string) $attribute, (string) $value);
}
public function validateUniqueCurrencyName(?string $attribute, ?string $value): bool
{
- return $this->validateUniqueCurrency('name', (string)$attribute, (string)$value);
+ return $this->validateUniqueCurrency('name', (string) $attribute, (string) $value);
}
public function validateUniqueCurrencySymbol(?string $attribute, ?string $value): bool
{
- return $this->validateUniqueCurrency('symbol', (string)$attribute, (string)$value);
+ return $this->validateUniqueCurrency('symbol', (string) $attribute, (string) $value);
}
/**
@@ -670,7 +674,7 @@ class FireflyValidator extends Validator
*/
public function validateUniqueExistingWebhook($value, $parameters, $something): bool
{
- $existingId = (int)($something[0] ?? 0);
+ $existingId = (int) ($something[0] ?? 0);
$trigger = 0;
$response = 0;
$delivery = 0;
@@ -681,7 +685,7 @@ class FireflyValidator extends Validator
// get existing webhook value:
if (0 !== $existingId) {
/** @var null|Webhook $webhook */
- $webhook = auth()->user()->webhooks()->find($existingId);
+ $webhook = auth()->user()->webhooks()->find($existingId);
if (null === $webhook) {
return false;
}
@@ -699,12 +703,13 @@ class FireflyValidator extends Validator
$userId = auth()->user()->id;
return 0 === Webhook::whereUserId($userId)
- ->where('trigger', $trigger)
- ->where('response', $response)
- ->where('delivery', $delivery)
- ->where('id', '!=', $existingId)
- ->where('url', $url)
- ->count();
+ ->where('trigger', $trigger)
+ ->where('response', $response)
+ ->where('delivery', $delivery)
+ ->where('id', '!=', $existingId)
+ ->where('url', $url)
+ ->count()
+ ;
}
return false;
@@ -726,23 +731,24 @@ class FireflyValidator extends Validator
public function validateUniqueObjectForUser($attribute, $value, $parameters): bool
{
[$table, $field] = $parameters;
- $exclude = (int)($parameters[2] ?? 0.0);
+ $exclude = (int) ($parameters[2] ?? 0.0);
/*
* If other data (in $this->getData()) contains
* ID field, set that field to be the $exclude.
*/
- $data = $this->getData();
- if (!array_key_exists(2, $parameters) && array_key_exists('id', $data) && (int)$data['id'] > 0) {
- $exclude = (int)$data['id'];
+ $data = $this->getData();
+ if (!array_key_exists(2, $parameters) && array_key_exists('id', $data) && (int) $data['id'] > 0) {
+ $exclude = (int) $data['id'];
}
// get entries from table
- $result = DB::table($table)
- ->where('user_id', auth()->user()->id)
- ->whereNull('deleted_at')
- ->where('id', '!=', $exclude)
- ->where($field, $value)
- ->first([$field]);
+ $result = DB::table($table)
+ ->where('user_id', auth()->user()->id)
+ ->whereNull('deleted_at')
+ ->where('id', '!=', $exclude)
+ ->where($field, $value)
+ ->first([$field])
+ ;
if (null === $result) {
return true; // not found, so true.
}
@@ -762,11 +768,12 @@ class FireflyValidator extends Validator
{
$exclude = $parameters[0] ?? null;
$query = DB::table('object_groups')
- ->whereNull('object_groups.deleted_at')
- ->where('object_groups.user_id', auth()->user()->id)
- ->where('object_groups.title', $value);
+ ->whereNull('object_groups.deleted_at')
+ ->where('object_groups.user_id', auth()->user()->id)
+ ->where('object_groups.title', $value)
+ ;
if (null !== $exclude) {
- $query->where('object_groups.id', '!=', (int)$exclude);
+ $query->where('object_groups.id', '!=', (int) $exclude);
}
return 0 === $query->count();
@@ -783,10 +790,11 @@ class FireflyValidator extends Validator
{
$exclude = $parameters[0] ?? null;
$query = PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id')
- ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')
- ->where('accounts.user_id', auth()->user()->id);
+ ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')
+ ->where('accounts.user_id', auth()->user()->id)
+ ;
if (null !== $exclude) {
- $query->where('piggy_banks.id', '!=', (int)$exclude);
+ $query->where('piggy_banks.id', '!=', (int) $exclude);
}
$query->where('piggy_banks.name', $value);
@@ -807,18 +815,19 @@ class FireflyValidator extends Validator
$deliveries = Webhook::getDeliveriesForValidation();
// integers
- $trigger = $triggers[$this->data['trigger']] ?? 0;
- $response = $responses[$this->data['response']] ?? 0;
- $delivery = $deliveries[$this->data['delivery']] ?? 0;
- $url = $this->data['url'];
- $userId = auth()->user()->id;
+ $trigger = $triggers[$this->data['trigger']] ?? 0;
+ $response = $responses[$this->data['response']] ?? 0;
+ $delivery = $deliveries[$this->data['delivery']] ?? 0;
+ $url = $this->data['url'];
+ $userId = auth()->user()->id;
return 0 === Webhook::whereUserId($userId)
- ->where('trigger', $trigger)
- ->where('response', $response)
- ->where('delivery', $delivery)
- ->where('url', $url)
- ->count();
+ ->where('trigger', $trigger)
+ ->where('response', $response)
+ ->where('delivery', $delivery)
+ ->where('url', $url)
+ ->count()
+ ;
}
return false;
@@ -831,9 +840,9 @@ class FireflyValidator extends Validator
}
/** @var User $user */
- $user = User::find($this->data['user_id']);
- $type = AccountType::find($this->data['account_type_id'])->first();
- $value = $this->data['name'];
+ $user = User::find($this->data['user_id']);
+ $type = AccountType::find($this->data['account_type_id'])->first();
+ $value = $this->data['name'];
/** @var null|Account $result */
$result = $user->accounts()->where('account_type_id', $type->id)->where('name', $value)->first();
@@ -849,10 +858,10 @@ class FireflyValidator extends Validator
/** @var Account $existingAccount */
$existingAccount = Account::find($this->data['id']);
- $type = $existingAccount->accountType;
- $ignore = $existingAccount->id;
+ $type = $existingAccount->accountType;
+ $ignore = $existingAccount->id;
- $entry = auth()->user()->accounts()->where('account_type_id', $type->id)->where('id', '!=', $ignore)->where('name', $value)->first();
+ $entry = auth()->user()->accounts()->where('account_type_id', $type->id)->where('id', '!=', $ignore)->where('name', $value)->first();
return null === $entry;
}
@@ -869,7 +878,7 @@ class FireflyValidator extends Validator
private function validateByAccountTypeId($value, $parameters): bool
{
$type = AccountType::find($this->data['account_type_id'])->first();
- $ignore = (int)($parameters[0] ?? 0.0);
+ $ignore = (int) ($parameters[0] ?? 0.0);
/** @var null|Account $result */
$result = auth()->user()->accounts()->where('account_type_id', $type->id)->where('id', '!=', $ignore)->where('name', $value)->first();
@@ -880,18 +889,18 @@ class FireflyValidator extends Validator
private function validateByAccountTypeString(string $value, array $parameters, string $type): bool
{
/** @var null|array $search */
- $search = config('firefly.accountTypeByIdentifier.' . $type);
+ $search = config('firefly.accountTypeByIdentifier.'.$type);
if (null === $search) {
return false;
}
$accountTypes = AccountType::whereIn('type', $search)->get();
- $ignore = (int)($parameters[0] ?? 0.0);
+ $ignore = (int) ($parameters[0] ?? 0.0);
$accountTypeIds = $accountTypes->pluck('id')->toArray();
/** @var null|Account $result */
- $result = auth()->user()->accounts()->whereIn('account_type_id', $accountTypeIds)->where('id', '!=', $ignore)->where('name', $value)->first();
+ $result = auth()->user()->accounts()->whereIn('account_type_id', $accountTypeIds)->where('id', '!=', $ignore)->where('name', $value)->first();
return null === $result;
}
@@ -904,10 +913,10 @@ class FireflyValidator extends Validator
/** @var Account $existingAccount */
$existingAccount = Account::find($accountId);
- $type = $existingAccount->accountType;
- $ignore = $existingAccount->id;
+ $type = $existingAccount->accountType;
+ $ignore = $existingAccount->id;
- $entry = auth()->user()->accounts()->where('account_type_id', $type->id)->where('id', '!=', $ignore)->where('name', $value)->first();
+ $entry = auth()->user()->accounts()->where('account_type_id', $type->id)->where('id', '!=', $ignore)->where('name', $value)->first();
return null === $entry;
}
diff --git a/config/firefly.php b/config/firefly.php
index d6ae43172e..8b9d429e83 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -78,8 +78,8 @@ return [
'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag.
],
- 'version' => '6.5.2',
- 'build_time' => 1772516401,
+ 'version' => 'develop/2026-03-04',
+ 'build_time' => 1772603748,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.
diff --git a/database/migrations/2016_06_16_000000_create_support_tables.php b/database/migrations/2016_06_16_000000_create_support_tables.php
index 47cd964a7a..8f14108e7c 100644
--- a/database/migrations/2016_06_16_000000_create_support_tables.php
+++ b/database/migrations/2016_06_16_000000_create_support_tables.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
private const TABLE_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
private const TABLE_ERROR = 'Could not create table "%s": %s';
diff --git a/database/migrations/2016_06_16_000001_create_users_table.php b/database/migrations/2016_06_16_000001_create_users_table.php
index 191dbd7871..246bbd2dcc 100644
--- a/database/migrations/2016_06_16_000001_create_users_table.php
+++ b/database/migrations/2016_06_16_000001_create_users_table.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
private const TABLE_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
private const TABLE_ERROR = 'Could not create table "%s": %s';
@@ -69,5 +68,4 @@ return new class extends Migration
}
}
}
-}
-;
+};
diff --git a/database/migrations/2016_06_16_000002_create_main_tables.php b/database/migrations/2016_06_16_000002_create_main_tables.php
index 99b11133d5..0f4045e838 100644
--- a/database/migrations/2016_06_16_000002_create_main_tables.php
+++ b/database/migrations/2016_06_16_000002_create_main_tables.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
private const TABLE_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
private const TABLE_ERROR = 'Could not create table "%s": %s';
@@ -631,5 +630,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2016_08_25_091522_changes_for_3101.php b/database/migrations/2016_08_25_091522_changes_for_3101.php
index 22e0900faf..84ab5cc39b 100644
--- a/database/migrations/2016_08_25_091522_changes_for_3101.php
+++ b/database/migrations/2016_08_25_091522_changes_for_3101.php
@@ -28,8 +28,7 @@ use Illuminate\Database\Migrations\Migration;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -41,5 +40,4 @@ return new class extends Migration
* @SuppressWarnings("PHPMD.ShortMethodName")
*/
public function up(): void {}
-}
- ;
+};
diff --git a/database/migrations/2016_09_12_121359_fix_nullables.php b/database/migrations/2016_09_12_121359_fix_nullables.php
index ee21bdb6e4..07611add77 100644
--- a/database/migrations/2016_09_12_121359_fix_nullables.php
+++ b/database/migrations/2016_09_12_121359_fix_nullables.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
private const COLUMN_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
private const TABLE_UPDATE_ERROR = 'Could not update table "%s": %s';
@@ -70,5 +69,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2016_10_09_150037_expand_transactions_table.php b/database/migrations/2016_10_09_150037_expand_transactions_table.php
index f05aafaac5..87131995cc 100644
--- a/database/migrations/2016_10_09_150037_expand_transactions_table.php
+++ b/database/migrations/2016_10_09_150037_expand_transactions_table.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -68,5 +67,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2016_10_22_075804_changes_for_v410.php b/database/migrations/2016_10_22_075804_changes_for_v410.php
index d4da66409a..b52e120f44 100644
--- a/database/migrations/2016_10_22_075804_changes_for_v410.php
+++ b/database/migrations/2016_10_22_075804_changes_for_v410.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -67,5 +66,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2016_11_24_210552_changes_for_v420.php b/database/migrations/2016_11_24_210552_changes_for_v420.php
index 7b6ea34afe..dd3c6426fc 100644
--- a/database/migrations/2016_11_24_210552_changes_for_v420.php
+++ b/database/migrations/2016_11_24_210552_changes_for_v420.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -68,5 +67,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2016_12_22_150431_changes_for_v430.php b/database/migrations/2016_12_22_150431_changes_for_v430.php
index 3cb0c8ecb5..44936af37d 100644
--- a/database/migrations/2016_12_22_150431_changes_for_v430.php
+++ b/database/migrations/2016_12_22_150431_changes_for_v430.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -71,5 +70,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2016_12_28_203205_changes_for_v431.php b/database/migrations/2016_12_28_203205_changes_for_v431.php
index 69d6df5acf..b43442f989 100644
--- a/database/migrations/2016_12_28_203205_changes_for_v431.php
+++ b/database/migrations/2016_12_28_203205_changes_for_v431.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -160,5 +159,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2017_04_13_163623_changes_for_v440.php b/database/migrations/2017_04_13_163623_changes_for_v440.php
index 83d535d7cb..02747993ab 100644
--- a/database/migrations/2017_04_13_163623_changes_for_v440.php
+++ b/database/migrations/2017_04_13_163623_changes_for_v440.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -101,5 +100,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2017_06_02_105232_changes_for_v450.php b/database/migrations/2017_06_02_105232_changes_for_v450.php
index a570f9a22d..ddb164cc81 100644
--- a/database/migrations/2017_06_02_105232_changes_for_v450.php
+++ b/database/migrations/2017_06_02_105232_changes_for_v450.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -105,5 +104,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2017_08_20_062014_changes_for_v470.php b/database/migrations/2017_08_20_062014_changes_for_v470.php
index 7b8b789e6a..73fdd09301 100644
--- a/database/migrations/2017_08_20_062014_changes_for_v470.php
+++ b/database/migrations/2017_08_20_062014_changes_for_v470.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -94,5 +93,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2017_11_04_170844_changes_for_v470a.php b/database/migrations/2017_11_04_170844_changes_for_v470a.php
index ca27844f3c..4c59abe9be 100644
--- a/database/migrations/2017_11_04_170844_changes_for_v470a.php
+++ b/database/migrations/2017_11_04_170844_changes_for_v470a.php
@@ -31,8 +31,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -68,5 +67,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php
index 13d4a53854..3f3195bd0d 100644
--- a/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php
+++ b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -67,5 +66,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php
index bccd0a5f68..145c0dc65c 100644
--- a/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php
+++ b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -69,5 +68,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php
index 4bac7ed68a..ba9ad1a4d4 100644
--- a/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php
+++ b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -65,5 +64,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_01_01_000004_create_oauth_clients_table.php b/database/migrations/2018_01_01_000004_create_oauth_clients_table.php
index 60223ee31c..ab561532f6 100644
--- a/database/migrations/2018_01_01_000004_create_oauth_clients_table.php
+++ b/database/migrations/2018_01_01_000004_create_oauth_clients_table.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -70,5 +69,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php
index 651e333c6f..506f9d960b 100644
--- a/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php
+++ b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -64,5 +63,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_03_19_141348_changes_for_v472.php b/database/migrations/2018_03_19_141348_changes_for_v472.php
index b8a6281cf0..8c3fe48513 100644
--- a/database/migrations/2018_03_19_141348_changes_for_v472.php
+++ b/database/migrations/2018_03_19_141348_changes_for_v472.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -91,5 +90,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_04_07_210913_changes_for_v473.php b/database/migrations/2018_04_07_210913_changes_for_v473.php
index f841bb44d5..b6ddb1d1b1 100644
--- a/database/migrations/2018_04_07_210913_changes_for_v473.php
+++ b/database/migrations/2018_04_07_210913_changes_for_v473.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -95,5 +94,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_04_29_174524_changes_for_v474.php b/database/migrations/2018_04_29_174524_changes_for_v474.php
index 3056e5cfe2..279d5f0dc1 100644
--- a/database/migrations/2018_04_29_174524_changes_for_v474.php
+++ b/database/migrations/2018_04_29_174524_changes_for_v474.php
@@ -29,8 +29,7 @@ use Illuminate\Database\Migrations\Migration;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -42,5 +41,4 @@ return new class extends Migration
* @SuppressWarnings("PHPMD.ShortMethodName")
*/
public function up(): void {}
-}
- ;
+};
diff --git a/database/migrations/2018_06_08_200526_changes_for_v475.php b/database/migrations/2018_06_08_200526_changes_for_v475.php
index 41f42870e6..af11b78e44 100644
--- a/database/migrations/2018_06_08_200526_changes_for_v475.php
+++ b/database/migrations/2018_06_08_200526_changes_for_v475.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -178,5 +177,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_09_05_195147_changes_for_v477.php b/database/migrations/2018_09_05_195147_changes_for_v477.php
index 6a55308ee4..7f0efce0a2 100644
--- a/database/migrations/2018_09_05_195147_changes_for_v477.php
+++ b/database/migrations/2018_09_05_195147_changes_for_v477.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -75,5 +74,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2018_11_06_172532_changes_for_v479.php b/database/migrations/2018_11_06_172532_changes_for_v479.php
index 89f59ba594..5cf8d12841 100644
--- a/database/migrations/2018_11_06_172532_changes_for_v479.php
+++ b/database/migrations/2018_11_06_172532_changes_for_v479.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -69,5 +68,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2019_01_28_193833_changes_for_v4710.php b/database/migrations/2019_01_28_193833_changes_for_v4710.php
index 214d151f84..b7b829f787 100644
--- a/database/migrations/2019_01_28_193833_changes_for_v4710.php
+++ b/database/migrations/2019_01_28_193833_changes_for_v4710.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -90,5 +89,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2019_02_05_055516_changes_for_v4711.php b/database/migrations/2019_02_05_055516_changes_for_v4711.php
index b57325ae21..0d6cbe5a28 100644
--- a/database/migrations/2019_02_05_055516_changes_for_v4711.php
+++ b/database/migrations/2019_02_05_055516_changes_for_v4711.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -72,5 +71,4 @@ return new class extends Migration
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
}
}
-}
- ;
+};
diff --git a/database/migrations/2019_02_11_170529_changes_for_v4712.php b/database/migrations/2019_02_11_170529_changes_for_v4712.php
index b995b096aa..c7d19e620c 100644
--- a/database/migrations/2019_02_11_170529_changes_for_v4712.php
+++ b/database/migrations/2019_02_11_170529_changes_for_v4712.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -63,5 +62,4 @@ return new class extends Migration
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
}
}
-}
- ;
+};
diff --git a/database/migrations/2019_03_11_223700_fix_ldap_configuration.php b/database/migrations/2019_03_11_223700_fix_ldap_configuration.php
index eb54a6d37e..fcd9163613 100644
--- a/database/migrations/2019_03_11_223700_fix_ldap_configuration.php
+++ b/database/migrations/2019_03_11_223700_fix_ldap_configuration.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -73,5 +72,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2019_03_22_183214_changes_for_v480.php b/database/migrations/2019_03_22_183214_changes_for_v480.php
index fed86b91af..132484df6d 100644
--- a/database/migrations/2019_03_22_183214_changes_for_v480.php
+++ b/database/migrations/2019_03_22_183214_changes_for_v480.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -160,5 +159,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2019_12_28_191351_make_locations_table.php b/database/migrations/2019_12_28_191351_make_locations_table.php
index da0569ae8a..7c771fe9bd 100644
--- a/database/migrations/2019_12_28_191351_make_locations_table.php
+++ b/database/migrations/2019_12_28_191351_make_locations_table.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -71,5 +70,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2020_03_13_201950_changes_for_v520.php b/database/migrations/2020_03_13_201950_changes_for_v520.php
index e9ce25398d..7bdfe65957 100644
--- a/database/migrations/2020_03_13_201950_changes_for_v520.php
+++ b/database/migrations/2020_03_13_201950_changes_for_v520.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -73,5 +72,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2020_06_07_063612_changes_for_v530.php b/database/migrations/2020_06_07_063612_changes_for_v530.php
index 4f608de67f..fd0011a2ea 100644
--- a/database/migrations/2020_06_07_063612_changes_for_v530.php
+++ b/database/migrations/2020_06_07_063612_changes_for_v530.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -84,5 +83,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2020_06_30_202620_changes_for_v530a.php b/database/migrations/2020_06_30_202620_changes_for_v530a.php
index c0033497c7..5da3b0c2c6 100644
--- a/database/migrations/2020_06_30_202620_changes_for_v530a.php
+++ b/database/migrations/2020_06_30_202620_changes_for_v530a.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -69,5 +68,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2020_07_24_162820_changes_for_v540.php b/database/migrations/2020_07_24_162820_changes_for_v540.php
index c1d72a47ea..25506adc1b 100644
--- a/database/migrations/2020_07_24_162820_changes_for_v540.php
+++ b/database/migrations/2020_07_24_162820_changes_for_v540.php
@@ -32,8 +32,7 @@ use Illuminate\Support\Facades\Schema;
*
* @codeCoverageIgnore
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -134,5 +133,4 @@ return new class extends Migration
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
}
}
-}
- ;
+};
diff --git a/database/migrations/2020_11_12_070604_changes_for_v550.php b/database/migrations/2020_11_12_070604_changes_for_v550.php
index cef03001ec..3f5a0dbbc1 100644
--- a/database/migrations/2020_11_12_070604_changes_for_v550.php
+++ b/database/migrations/2020_11_12_070604_changes_for_v550.php
@@ -30,8 +30,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Class ChangesForV550
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -265,5 +264,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2021_03_12_061213_changes_for_v550b2.php b/database/migrations/2021_03_12_061213_changes_for_v550b2.php
index 47f0998294..43da553303 100644
--- a/database/migrations/2021_03_12_061213_changes_for_v550b2.php
+++ b/database/migrations/2021_03_12_061213_changes_for_v550b2.php
@@ -30,8 +30,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Class ChangesForV550b2
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -76,5 +75,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2021_05_09_064644_add_ldap_columns_to_users_table.php b/database/migrations/2021_05_09_064644_add_ldap_columns_to_users_table.php
index 6fb4fdb6b9..7dd64c2907 100644
--- a/database/migrations/2021_05_09_064644_add_ldap_columns_to_users_table.php
+++ b/database/migrations/2021_05_09_064644_add_ldap_columns_to_users_table.php
@@ -27,8 +27,7 @@ use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -64,5 +63,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2021_05_13_053836_extend_currency_info.php b/database/migrations/2021_05_13_053836_extend_currency_info.php
index c65bad331c..5ec04843ac 100644
--- a/database/migrations/2021_05_13_053836_extend_currency_info.php
+++ b/database/migrations/2021_05_13_053836_extend_currency_info.php
@@ -30,8 +30,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Class ExtendCurrencyInfo
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -54,5 +53,4 @@ return new class extends Migration
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
}
}
-}
- ;
+};
diff --git a/database/migrations/2021_07_05_193044_drop_tele_table.php b/database/migrations/2021_07_05_193044_drop_tele_table.php
index 1a36b35c8a..c1a63dc0a4 100644
--- a/database/migrations/2021_07_05_193044_drop_tele_table.php
+++ b/database/migrations/2021_07_05_193044_drop_tele_table.php
@@ -28,8 +28,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Class DropTeleTable
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -47,5 +46,4 @@ return new class extends Migration
{
Schema::dropIfExists('telemetry');
}
-}
- ;
+};
diff --git a/database/migrations/2021_08_28_073733_user_groups.php b/database/migrations/2021_08_28_073733_user_groups.php
index 54f4742b23..24471a3482 100644
--- a/database/migrations/2021_08_28_073733_user_groups.php
+++ b/database/migrations/2021_08_28_073733_user_groups.php
@@ -30,8 +30,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Class UserGroups
*/
-return new class extends Migration
-{
+return new class extends Migration {
private array $tables = [
'accounts',
'attachments',
@@ -198,5 +197,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2021_12_27_000001_create_local_personal_access_tokens_table.php b/database/migrations/2021_12_27_000001_create_local_personal_access_tokens_table.php
index 815ce40583..4159d98969 100644
--- a/database/migrations/2021_12_27_000001_create_local_personal_access_tokens_table.php
+++ b/database/migrations/2021_12_27_000001_create_local_personal_access_tokens_table.php
@@ -30,8 +30,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Class CreateLocalPersonalAccessTokensTable
*/
-return new class extends Migration
-{
+return new class extends Migration {
/**
* Reverse the migrations.
*/
@@ -66,5 +65,4 @@ return new class extends Migration
}
}
}
-}
- ;
+};
diff --git a/database/migrations/2024_12_19_061003_add_native_amount_column.php b/database/migrations/2024_12_19_061003_add_native_amount_column.php
index 7822ea1544..f1ca1e61a8 100644
--- a/database/migrations/2024_12_19_061003_add_native_amount_column.php
+++ b/database/migrations/2024_12_19_061003_add_native_amount_column.php
@@ -1,4 +1,5 @@
<?php
+
/*
* 2024_12_19_061003_add_native_amount_column.php
* Copyright (c) 2025 [email protected].
diff --git a/database/migrations/2025_07_10_065736_rename_tag_mode.php b/database/migrations/2025_07_10_065736_rename_tag_mode.php
index 7fb0d3f40e..aecd585a00 100644
--- a/database/migrations/2025_07_10_065736_rename_tag_mode.php
+++ b/database/migrations/2025_07_10_065736_rename_tag_mode.php
@@ -1,5 +1,7 @@
<?php
+
declare(strict_types=1);
+
/*
* 2025_07_10_065736_rename_tag_mode.php
* Copyright (c) 2025 [email protected]
diff --git a/database/migrations/2025_08_19_180459_create_webhook_details_tables.php b/database/migrations/2025_08_19_180459_create_webhook_details_tables.php
index b2aaf1262c..bd5de77244 100644
--- a/database/migrations/2025_08_19_180459_create_webhook_details_tables.php
+++ b/database/migrations/2025_08_19_180459_create_webhook_details_tables.php
@@ -1,5 +1,7 @@
<?php
+
declare(strict_types=1);
+
/*
* 2025_08_19_180459_create_webhook_details_tables.php
* Copyright (c) 2025 [email protected]
diff --git a/database/migrations/2026_01_28_201901_migrations_01_2026.php b/database/migrations/2026_01_28_201901_migrations_01_2026.php
index afd7e61b11..efe9329210 100644
--- a/database/migrations/2026_01_28_201901_migrations_01_2026.php
+++ b/database/migrations/2026_01_28_201901_migrations_01_2026.php
@@ -15,9 +15,7 @@ return new class extends Migration {
/**
* Reverse the migrations.
*/
- public function down(): void
- {
- }
+ public function down(): void {}
public function up(): void
{
diff --git a/package-lock.json b/package-lock.json
index 337648318f..ca04b9c7bb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4597,9 +4597,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001775",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001775.tgz",
- "integrity": "sha512-s3Qv7Lht9zbVKE9XoTyRG6wVDCKdtOFIjBGg3+Yhn6JaytuNKPIjBMTMIY1AnOH3seL5mvF+x33oGAyK3hVt3A==",
+ "version": "1.0.30001776",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001776.tgz",
+ "integrity": "sha512-sg01JDPzZ9jGshqKSckOQthXnYwOEP50jeVFhaSFbZcOy05TiuuaffDOfcwtCisJ9kNQuLBFibYywv2Bgm9osw==",
"dev": true,
"funding": [
{
@@ -5802,9 +5802,9 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
- "version": "1.5.302",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.302.tgz",
- "integrity": "sha512-sM6HAN2LyK82IyPBpznDRqlTQAtuSaO+ShzFiWTvoMJLHyZ+Y39r8VMfHzwbU8MVBzQ4Wdn85+wlZl2TLGIlwg==",
+ "version": "1.5.307",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.307.tgz",
+ "integrity": "sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==",
"dev": true,
"license": "ISC"
},
@@ -7331,9 +7331,9 @@
}
},
"node_modules/immutable": {
- "version": "5.1.4",
- "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz",
- "integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==",
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.5.tgz",
+ "integrity": "sha512-t7xcm2siw+hlUM68I+UEOK+z84RzmN59as9DZ7P1l0994DKUWV7UXBMQZVxaoMSRQ+PBZbHCOoBt7a2wxOMt+A==",
"dev": true,
"license": "MIT"
},
@@ -8514,9 +8514,9 @@
}
},
"node_modules/node-releases": {
- "version": "2.0.27",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
- "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
+ "version": "2.0.36",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz",
+ "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==",
"dev": true,
"license": "MIT"
},
@@ -10378,16 +10378,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/serialize-javascript": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
- "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "randombytes": "^2.1.0"
- }
- },
"node_modules/serve-index": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.2.tgz",
@@ -11033,16 +11023,15 @@
}
},
"node_modules/terser-webpack-plugin": {
- "version": "5.3.16",
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz",
- "integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==",
+ "version": "5.3.17",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.17.tgz",
+ "integrity": "sha512-YR7PtUp6GMU91BgSJmlaX/rS2lGDbAF7D+Wtq7hRO+MiljNmodYvqslzCFiYVAgW+Qoaaia/QUIP4lGXufjdZw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
"jest-worker": "^27.4.5",
"schema-utils": "^4.3.0",
- "serialize-javascript": "^6.0.2",
"terser": "^5.31.1"
},
"engines": {
@@ -11836,9 +11825,9 @@
"license": "BSD-2-Clause"
},
"node_modules/webpack": {
- "version": "5.105.3",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.3.tgz",
- "integrity": "sha512-LLBBA4oLmT7sZdHiYE/PeVuifOxYyE2uL/V+9VQP7YSYdJU7bSf7H8bZRRxW8kEPMkmVjnrXmoR3oejIdX0xbg==",
+ "version": "5.105.4",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.4.tgz",
+ "integrity": "sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -11852,7 +11841,7 @@
"acorn-import-phases": "^1.0.3",
"browserslist": "^4.28.1",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.19.0",
+ "enhanced-resolve": "^5.20.0",
"es-module-lexer": "^2.0.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -11864,7 +11853,7 @@
"neo-async": "^2.6.2",
"schema-utils": "^4.3.3",
"tapable": "^2.3.0",
- "terser-webpack-plugin": "^5.3.16",
+ "terser-webpack-plugin": "^5.3.17",
"watchpack": "^2.5.1",
"webpack-sources": "^3.3.4"
},