Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Clean up some phpstan issues.
James Cole993a2491e963
diff --git a/app/Api/V1/Controllers/Summary/BasicController.php b/app/Api/V1/Controllers/Summary/BasicController.phpindex 872e3b90fc..5bcc3c5eb5 100644--- a/app/Api/V1/Controllers/Summary/BasicController.php+++ b/app/Api/V1/Controllers/Summary/BasicController.php@@ -112,19 +112,6 @@ final class BasicController extends Controllerreturn response()->json($return);}- /**- * Check if date is outside session range.- */- protected function notInDateRange(Carbon $date, Carbon $start, Carbon $end): bool- { // Validate a preference- if ($start->greaterThanOrEqualTo($date) && $end->greaterThanOrEqualTo($date)) {- return true;- }-- // start and end in the past? use $end- return $start->lessThanOrEqualTo($date) && $end->lessThanOrEqualTo($date);- }-private function getBalanceInformation(Carbon $start, Carbon $end): array{Log::debug('getBalanceInformation');diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.phpindex 94a034bcbb..86a14f790f 100644--- a/app/Http/Controllers/Auth/RegisterController.php+++ b/app/Http/Controllers/Auth/RegisterController.php@@ -176,7 +176,7 @@ final class RegisterController extends Controller/*** @throws FireflyException*/- protected function allowedToRegister(): bool+ private function allowedToRegister(): bool{// is allowed to register?$allowRegistration = true;diff --git a/app/Repositories/Tag/OperationsRepository.php b/app/Repositories/Tag/OperationsRepository.phpindex cd055a64fb..0ccba0132b 100644--- a/app/Repositories/Tag/OperationsRepository.php+++ b/app/Repositories/Tag/OperationsRepository.php@@ -101,8 +101,8 @@ 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' => isset($journal['foreign_amount']) ? Steam::negative((string) $journal['foreign_amount']) : null,- 'pc_amount' => isset($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' => $journal['source_account_id'],'budget_name' => $journal['budget_name'],@@ -186,8 +186,8 @@ 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' => isset($journal['foreign_amount']) ? Steam::positive((string) $journal['foreign_amount']) : null,- 'pc_amount' => isset($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' => $journal['source_account_id'],'budget_name' => $journal['budget_name'],diff --git a/database/migrations/2024_11_30_075826_multi_piggy.php b/database/migrations/2024_11_30_075826_multi_piggy.phpindex 54258b6e9f..e384da443e 100644--- a/database/migrations/2024_11_30_075826_multi_piggy.php+++ b/database/migrations/2024_11_30_075826_multi_piggy.php@@ -29,7 +29,7 @@ use Illuminate\Support\Facades\Log;use Illuminate\Support\Facades\Schema;return new class extends Migration {- protected static function hasForeign(string $table, string $column): bool+ private static function hasForeign(string $table, string $column): bool{$foreignKeysDefinitions = Schema::getForeignKeys($table);foreach ($foreignKeysDefinitions as $foreignKeyDefinition) {