Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Code cleanup
James Cole2b0a3ec81856
diff --git a/.ci/php-cs-fixer/composer.lock b/.ci/php-cs-fixer/composer.lockindex c0ca7faf40..6848ee8ff9 100644--- a/.ci/php-cs-fixer/composer.lock+++ b/.ci/php-cs-fixer/composer.lock@@ -539,16 +539,16 @@},{"name": "symfony/console",- "version": "v7.0.0",+ "version": "v7.0.1","source": {"type": "git","url": "https://github.com/symfony/console.git",- "reference": "64e06788686633deb8d9a7c75ab31bcf4b233a26"+ "reference": "cdce5c684b2f920bb1343deecdfba356ffad83d5"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/console/zipball/64e06788686633deb8d9a7c75ab31bcf4b233a26",- "reference": "64e06788686633deb8d9a7c75ab31bcf4b233a26",+ "url": "https://api.github.com/repos/symfony/console/zipball/cdce5c684b2f920bb1343deecdfba356ffad83d5",+ "reference": "cdce5c684b2f920bb1343deecdfba356ffad83d5","shasum": ""},"require": {@@ -612,7 +612,7 @@"terminal"],"support": {- "source": "https://github.com/symfony/console/tree/v7.0.0"+ "source": "https://github.com/symfony/console/tree/v7.0.1"},"funding": [{@@ -628,7 +628,7 @@"type": "tidelift"}],- "time": "2023-11-20T16:43:42+00:00"+ "time": "2023-12-01T15:10:06+00:00"},{"name": "symfony/deprecation-contracts",diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.phpindex 151498839a..fb4206fbf1 100644--- a/app/Handlers/Events/UserEventHandler.php+++ b/app/Handlers/Events/UserEventHandler.php@@ -131,7 +131,7 @@ class UserEventHandler$group = null;// create a new group.- while (true === $groupExists) { // @phpstan-ignore-line+ while (true === $groupExists) { /** @phpstan-ignore-line */$groupExists = UserGroup::where('title', $groupTitle)->count() > 0;if (false === $groupExists) {$group = UserGroup::create(['title' => $groupTitle]);@@ -205,7 +205,7 @@ class UserEventHandlerif (false === $entry['notified']) {try {Notification::send($user, new UserLogin($ipAddress));- } catch (Exception $e) {// @phpstan-ignore-line+ } catch (Exception $e) {/** @phpstan-ignore-line */$message = $e->getMessage();if (str_contains($message, 'Bcc')) {app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');@@ -239,7 +239,7 @@ class UserEventHandlerif ($repository->hasRole($user, 'owner')) {try {Notification::send($user, new AdminRegistrationNotification($event->user));- } catch (Exception $e) { // @phpstan-ignore-line+ } catch (Exception $e) { /** @phpstan-ignore-line */$message = $e->getMessage();if (str_contains($message, 'Bcc')) {app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');@@ -316,7 +316,7 @@ class UserEventHandler{try {Notification::send($event->user, new UserNewPassword(route('password.reset', [$event->token])));- } catch (Exception $e) { // @phpstan-ignore-line+ } catch (Exception $e) { /** @phpstan-ignore-line */$message = $e->getMessage();if (str_contains($message, 'Bcc')) {app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');@@ -364,7 +364,7 @@ class UserEventHandlerif ($sendMail) {try {Notification::send($event->user, new UserRegistrationNotification());- } catch (Exception $e) { // @phpstan-ignore-line+ } catch (Exception $e) { /** @phpstan-ignore-line */$message = $e->getMessage();if (str_contains($message, 'Bcc')) {app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');diff --git a/app/Repositories/Account/OperationsRepository.php b/app/Repositories/Account/OperationsRepository.phpindex ced842838b..d46c759098 100644--- a/app/Repositories/Account/OperationsRepository.php+++ b/app/Repositories/Account/OperationsRepository.php@@ -272,7 +272,7 @@ class OperationsRepository implements OperationsRepositoryInterface'currency_code' => $journal['currency_code'],'currency_decimal_places' => $journal['currency_decimal_places'],];- $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->$direction($journal['amount']));// @phpstan-ignore-line+ $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->$direction($journal['amount']));/** @phpstan-ignore-line */// also do foreign amount:$foreignId = (int)$journal['foreign_currency_id'];diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.phpindex 59765c94c4..c230c323df 100644--- a/app/Support/Request/ConvertsDataTypes.php+++ b/app/Support/Request/ConvertsDataTypes.php@@ -181,7 +181,7 @@ trait ConvertsDataTypes/** @var AccountRepositoryInterface $repository */$repository = app(AccountRepositoryInterface::class);- if (method_exists($this, 'validateUserGroup')) { // @phpstan-ignore-line+ if (method_exists($this, 'validateUserGroup')) { /** @phpstan-ignore-line */$userGroup = $this->validateUserGroup($this);if (null !== $userGroup) {$repository->setUserGroup($userGroup);diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.phpindex 5bb8455acc..afa1ddbbdd 100644--- a/app/Validation/FireflyValidator.php+++ b/app/Validation/FireflyValidator.php@@ -229,7 +229,7 @@ class FireflyValidator extends Validator}try {$checksum = bcmod($iban, '97');- } catch (ValueError $e) { // @phpstan-ignore-line+ } catch (ValueError $e) { /** @phpstan-ignore-line */$message = sprintf('Could not validate IBAN check value "%s" (IBAN "%s")', $iban, $value);app('log')->error($message);app('log')->error($e->getTraceAsString());