Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Optimize some code.
James Cole9f80d729a23b
diff --git a/app/Api/V1/Requests/TransactionUpdateRequest.php b/app/Api/V1/Requests/TransactionUpdateRequest.phpindex 302f8f3700..1f41e3a3ce 100644--- a/app/Api/V1/Requests/TransactionUpdateRequest.php+++ b/app/Api/V1/Requests/TransactionUpdateRequest.php@@ -329,8 +329,8 @@ class TransactionUpdateRequest extends FormRequestforeach ($this->dateFields as $fieldName) {Log::debug(sprintf('Now at date field %s', $fieldName));if (array_key_exists($fieldName, $transaction)) {- $current[$fieldName] = $this->dateFromValue((string) $transaction[$fieldName]);Log::debug(sprintf('New value: "%s"', (string) $transaction[$fieldName]));+ $current[$fieldName] = $this->dateFromValue((string) $transaction[$fieldName]);}}diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.phpindex 2c21024f88..2bb20860ed 100644--- a/app/Repositories/Account/AccountRepository.php+++ b/app/Repositories/Account/AccountRepository.php@@ -48,19 +48,7 @@ use Storage;*/class AccountRepository implements AccountRepositoryInterface{-- /** @var User */- private $user;-- /**- * Constructor.- */- public function __construct()- {- if ('testing' === config('app.env')) {- Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));- }- }+ private User $user;/*** @param array $typesdiff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.phpindex da61f7e503..b49debc7ca 100644--- a/app/Repositories/Bill/BillRepository.php+++ b/app/Repositories/Bill/BillRepository.php@@ -53,16 +53,6 @@ class BillRepository implements BillRepositoryInterfaceprivate User $user;- /**- * Constructor.- */- public function __construct()- {- if ('testing' === config('app.env')) {- Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));- }- }-/*** @param Bill $bill*diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.phpindex 71f07f2cf0..eab304c96c 100644--- a/app/Repositories/Tag/TagRepository.php+++ b/app/Repositories/Tag/TagRepository.php@@ -43,18 +43,7 @@ use Storage;*/class TagRepository implements TagRepositoryInterface{- /** @var User */- private $user;-- /**- * Constructor.- */- public function __construct()- {- if ('testing' === config('app.env')) {- Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));- }- }+ private User $user;/*** @return intdiff --git a/app/Support/Search/BetterQuerySearch.php b/app/Support/Search/BetterQuerySearch.phpindex dbde544906..7e08a257f0 100644--- a/app/Support/Search/BetterQuerySearch.php+++ b/app/Support/Search/BetterQuerySearch.php@@ -185,9 +185,6 @@ class BetterQuerySearch implements SearchInterfaceLog::error(sprintf('Cannot handle node %s', $class));throw new FireflyException(sprintf('Firefly III search cant handle "%s"-nodes', $class));case Word::class:- Log::debug(sprintf('Now handle %s', $class));- $this->words[] = $searchNode->getValue();- break;case Phrase::class:Log::debug(sprintf('Now handle %s', $class));$this->words[] = $searchNode->getValue();