Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Clean up various code.
James Cole179b86c3ba73
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.phpindex 5a5501abb3..1cd44db4b0 100644--- a/app/Helpers/Collector/GroupCollector.php+++ b/app/Helpers/Collector/GroupCollector.php@@ -239,9 +239,6 @@ class GroupCollector implements GroupCollectorInterface{$result = $this->query->get($this->fields);- //Log::debug('Query in full');- //$this->dumpQueryInLogs();-// now to parse this into an array.$collection = $this->parseArray($result);$this->total = $collection->count();diff --git a/app/Http/Middleware/StartFireflySession.php b/app/Http/Middleware/StartFireflySession.phpindex 4b0932f891..1b8d974f1c 100644--- a/app/Http/Middleware/StartFireflySession.php+++ b/app/Http/Middleware/StartFireflySession.php@@ -46,16 +46,11 @@ class StartFireflySession extends StartSession$safeUrl = app('steam')->getSafeUrl($url, route('index'));if ($url !== $safeUrl) {- //Log::debug(sprintf('storeCurrentUrl: converted "%s" to "%s", so will not use it.', $url, $safeUrl));return;}if ('GET' === $request->method() && !$request->ajax()) {- //Log::debug(sprintf('storeCurrentUrl: Redirect is now "%s".', $safeUrl));$session->setPreviousUrl($safeUrl);-- // return;}- //Log::debug(sprintf('storeCurrentUrl: Refuse to set "%s" as current URL.', $safeUrl));}}diff --git a/app/Support/ParseDateString.php b/app/Support/ParseDateString.phpindex 99dca10c9e..6d5e41cbe8 100644--- a/app/Support/ParseDateString.php+++ b/app/Support/ParseDateString.php@@ -217,26 +217,33 @@ class ParseDateStringpublic function parseRange(string $date): array{// several types of range can be submitted+ $result = [+ 'exact' => new Carbon('1984-09-17'),+ ];switch (true) {default:break;case $this->isDayRange($date):- return $this->parseDayRange($date);+ $result = $this->parseDayRange($date);+ break;case $this->isMonthRange($date):- return $this->parseMonthRange($date);+ $result = $this->parseMonthRange($date);+ break;case $this->isYearRange($date):- return $this->parseYearRange($date);+ $result = $this->parseYearRange($date);+ break;case $this->isMonthDayRange($date):- return $this->parseMonthDayRange($date);+ $result = $this->parseMonthDayRange($date);+ break;case $this->isDayYearRange($date):- return $this->parseDayYearRange($date);+ $result = $this->parseDayYearRange($date);+ break;case $this->isMonthYearRange($date):- return $this->parseMonthYearRange($date);+ $result = $this->parseMonthYearRange($date);+ break;}- return [- 'exact' => new Carbon('1984-09-17'),- ];+ return $result;}/**diff --git a/app/Validation/TransactionValidation.php b/app/Validation/TransactionValidation.phpindex 276c735fb7..0289c6ab60 100644--- a/app/Validation/TransactionValidation.php+++ b/app/Validation/TransactionValidation.php@@ -190,7 +190,7 @@ trait TransactionValidationLog::debug('Will try to validate source account information.');$sourceId = (int)($transaction['source_id'] ?? 0);$sourceName = $transaction['source_name'] ?? null;- $validSource = $accountValidator->validateSource($sourceId, $sourceName, null);+ $validSource = $accountValidator->validateSource(['id' => $sourceId, 'name' => $sourceName]);// do something with result:if (false === $validSource) {