Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Removed most logging.
James Cole322fef2db190
diff --git a/app/Rules/Triggers/AmountExactly.php b/app/Rules/Triggers/AmountExactly.phpindex 850df26074..afc20aaec7 100644--- a/app/Rules/Triggers/AmountExactly.php+++ b/app/Rules/Triggers/AmountExactly.php@@ -58,15 +58,8 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface$compare = $this->triggerValue;$result = bccomp($amount, $compare, 4);if ($result === 0) {- // found something- Log::debug($amount . ' is exactly ' . $compare . '. Return true.');-return true;}-- // found nothing.- Log::debug($amount . ' is not exactly ' . $compare . '. Return false.');-return false;}diff --git a/app/Rules/Triggers/AmountLess.php b/app/Rules/Triggers/AmountLess.phpindex 458f2ccb5c..f84d66f4cb 100644--- a/app/Rules/Triggers/AmountLess.php+++ b/app/Rules/Triggers/AmountLess.php@@ -58,15 +58,9 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface$compare = $this->triggerValue;$result = bccomp($amount, $compare, 4);if ($result === -1) {- // found something- Log::debug($amount . ' is less than ' . $compare . '. Return true.');-return true;}- // found nothing.- Log::debug($amount . ' is not less than ' . $compare . '. Return false.');-return false;}diff --git a/app/Rules/Triggers/AmountMore.php b/app/Rules/Triggers/AmountMore.phpindex d0fd3ccdcb..490a1a81d1 100644--- a/app/Rules/Triggers/AmountMore.php+++ b/app/Rules/Triggers/AmountMore.php@@ -58,15 +58,9 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface$compare = $this->triggerValue;$result = bccomp($amount, $compare, 4);if ($result === 1) {- // found something- Log::debug($amount . ' is more than ' . $compare . '. Return true.');-return true;}- // found nothing.- Log::debug($amount . ' is not more than ' . $compare . '. Return false.');-return false;}diff --git a/app/Rules/Triggers/DescriptionContains.php b/app/Rules/Triggers/DescriptionContains.phpindex 497cb14fb4..b599fef77e 100644--- a/app/Rules/Triggers/DescriptionContains.php+++ b/app/Rules/Triggers/DescriptionContains.php@@ -59,15 +59,9 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf$strpos = strpos($source, $search);if (!($strpos === false)) {- // found something- Log::debug('"' . $source . '" contains the text "' . $search . '". Return true.');-return true;}- // found nothing.- Log::debug('"' . $source . '" does not contain the text "' . $search . '". Return false.');-return false;}diff --git a/app/Rules/Triggers/DescriptionEnds.php b/app/Rules/Triggers/DescriptionEnds.phpindex 02e64fb170..c6770a2298 100644--- a/app/Rules/Triggers/DescriptionEnds.php+++ b/app/Rules/Triggers/DescriptionEnds.php@@ -61,23 +61,15 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface// if the string to search for is longer than the description,// shorten the search string.if ($searchLength > $descriptionLength) {- Log::debug('Search string "' . $search . '" (' . $searchLength . ') is longer than "' . $description . '" (' . $descriptionLength . '). ');$search = substr($search, ($descriptionLength * -1));$searchLength = strlen($search);- Log::debug('Search string is now "' . $search . '" (' . $searchLength . ') instead.');}-$part = substr($description, $searchLength * -1);if ($part == $search) {- Log::debug('"' . $description . '" ends with "' . $search . '". Return true.');-return true;}- Log::debug('"' . $description . '" does not end with "' . $search . '". Return false.');-return false;-}}diff --git a/app/Rules/Triggers/DescriptionIs.php b/app/Rules/Triggers/DescriptionIs.phpindex 6e6e160368..f1383991a2 100644--- a/app/Rules/Triggers/DescriptionIs.php+++ b/app/Rules/Triggers/DescriptionIs.php@@ -57,13 +57,8 @@ final class DescriptionIs extends AbstractTrigger implements TriggerInterface$search = strtolower($this->triggerValue);if ($description == $search) {- Log::debug('"' . $description . '" equals "' . $search . '" exactly. Return true.');-return true;}- Log::debug('"' . $description . '" does not equal "' . $search . '". Return false.');-return false;-}}diff --git a/app/Rules/Triggers/DescriptionStarts.php b/app/Rules/Triggers/DescriptionStarts.phpindex 557c799e68..72ae15b01b 100644--- a/app/Rules/Triggers/DescriptionStarts.php+++ b/app/Rules/Triggers/DescriptionStarts.php@@ -59,13 +59,8 @@ final class DescriptionStarts extends AbstractTrigger implements TriggerInterfac$part = substr($description, 0, strlen($search));if ($part == $search) {- Log::debug('"' . $description . '" starts with "' . $search . '". Return true.');-return true;}- Log::debug('"' . $description . '" does not start with "' . $search . '". Return false.');-return false;-}}diff --git a/app/Rules/Triggers/FromAccountContains.php b/app/Rules/Triggers/FromAccountContains.phpindex 9133279844..a6336f4841 100644--- a/app/Rules/Triggers/FromAccountContains.php+++ b/app/Rules/Triggers/FromAccountContains.php@@ -11,7 +11,6 @@ declare(strict_types = 1);namespace FireflyIII\Rules\Triggers;use FireflyIII\Models\TransactionJournal;-use Log;/*** Class FromAccountContains@@ -58,15 +57,9 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf$strpos = strpos($fromAccountName, $search);if (!($strpos === false)) {- // found something- Log::debug('"' . $fromAccountName . '" contains the text "' . $search . '". Return true.');-return true;}- // found nothing.- Log::debug('"' . $fromAccountName . '" does not contain the text "' . $search . '". Return false.');-return false;}diff --git a/app/Rules/Triggers/FromAccountEnds.php b/app/Rules/Triggers/FromAccountEnds.phpindex 43c0fa6846..fcffd65c50 100644--- a/app/Rules/Triggers/FromAccountEnds.php+++ b/app/Rules/Triggers/FromAccountEnds.php@@ -61,22 +61,16 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface// if the string to search for is longer than the account name,// shorten the search string.if ($searchLength > $nameLength) {- Log::debug('Search string "' . $search . '" (' . $searchLength . ') is longer than "' . $name . '" (' . $nameLength . '). ');$search = substr($search, ($nameLength * -1));$searchLength = strlen($search);- Log::debug('Search string is now "' . $search . '" (' . $searchLength . ') instead.');}$part = substr($name, $searchLength * -1);if ($part == $search) {- Log::debug('"' . $name . '" ends with "' . $search . '". Return true.');-return true;}- Log::debug('"' . $name . '" does not end with "' . $search . '". Return false.');-return false;}diff --git a/app/Rules/Triggers/FromAccountIs.php b/app/Rules/Triggers/FromAccountIs.phpindex fd8640d3b6..0aa91379a6 100644--- a/app/Rules/Triggers/FromAccountIs.php+++ b/app/Rules/Triggers/FromAccountIs.php@@ -57,12 +57,8 @@ final class FromAccountIs extends AbstractTrigger implements TriggerInterface$search = strtolower($this->triggerValue);if ($name == $search) {- Log::debug('"' . $name . '" equals "' . $search . '" exactly. Return true.');-return true;}- Log::debug('"' . $name . '" does not equal "' . $search . '" exactly. Return false.');-return false;}diff --git a/app/Rules/Triggers/FromAccountStarts.php b/app/Rules/Triggers/FromAccountStarts.phpindex 5602919773..f86a9d8976 100644--- a/app/Rules/Triggers/FromAccountStarts.php+++ b/app/Rules/Triggers/FromAccountStarts.php@@ -59,13 +59,8 @@ final class FromAccountStarts extends AbstractTrigger implements TriggerInterfac$part = substr($name, 0, strlen($search));if ($part == $search) {- Log::debug('"' . $name . '" starts with "' . $search . '". Return true.');-return true;}- Log::debug('"' . $name . '" does not start with "' . $search . '". Return false.');-return false;-}}diff --git a/app/Rules/Triggers/ToAccountContains.php b/app/Rules/Triggers/ToAccountContains.phpindex 3d9284e687..58af4a3378 100644--- a/app/Rules/Triggers/ToAccountContains.php+++ b/app/Rules/Triggers/ToAccountContains.php@@ -58,16 +58,8 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac$strpos = strpos($toAccountName, $search);if (!($strpos === false)) {- // found something- Log::debug('"' . $toAccountName . '" contains the text "' . $search . '". Return true.');-return true;}-- // found nothing.- Log::debug('"' . $toAccountName . '" does not contain the text "' . $search . '". Return false.');-return false;-}}diff --git a/app/Rules/Triggers/ToAccountEnds.php b/app/Rules/Triggers/ToAccountEnds.phpindex 5a4ba9af43..77d41ecf20 100644--- a/app/Rules/Triggers/ToAccountEnds.php+++ b/app/Rules/Triggers/ToAccountEnds.php@@ -61,23 +61,16 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface// if the string to search for is longer than the account name,// shorten the search string.if ($searchLength > $toAccountNameLength) {- Log::debug('Search string "' . $search . '" (' . $searchLength . ') is longer than "' . $toAccountName . '" (' . $toAccountNameLength . '). ');$search = substr($search, ($toAccountNameLength * -1));$searchLength = strlen($search);- Log::debug('Search string is now "' . $search . '" (' . $searchLength . ') instead.');}$part = substr($toAccountName, $searchLength * -1);if ($part == $search) {- Log::debug('"' . $toAccountName . '" ends with "' . $search . '". Return true.');-return true;}- Log::debug('"' . $toAccountName . '" does not end with "' . $search . '". Return false.');-return false;-}}diff --git a/app/Rules/Triggers/ToAccountIs.php b/app/Rules/Triggers/ToAccountIs.phpindex 3ab3cc06b0..124db72c7c 100644--- a/app/Rules/Triggers/ToAccountIs.php+++ b/app/Rules/Triggers/ToAccountIs.php@@ -57,12 +57,8 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface$search = strtolower($this->triggerValue);if ($toAccountName == $search) {- Log::debug('"' . $toAccountName . '" equals "' . $search . '" exactly. Return true.');-return true;}- Log::debug('"' . $toAccountName . '" does not equal "' . $search . '". Return false.');-return false;}diff --git a/app/Rules/Triggers/ToAccountStarts.php b/app/Rules/Triggers/ToAccountStarts.phpindex 356fbcfc7d..1c43ce86a3 100644--- a/app/Rules/Triggers/ToAccountStarts.php+++ b/app/Rules/Triggers/ToAccountStarts.php@@ -59,12 +59,8 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface$part = substr($toAccountName, 0, strlen($search));if ($part == $search) {- Log::debug('"' . $toAccountName . '" starts with "' . $search . '". Return true.');-return true;}- Log::debug('"' . $toAccountName . '" does not start with "' . $search . '". Return false.');-return false;}diff --git a/app/Rules/Triggers/TransactionType.php b/app/Rules/Triggers/TransactionType.phpindex e17040f2bb..867bc90063 100644--- a/app/Rules/Triggers/TransactionType.php+++ b/app/Rules/Triggers/TransactionType.php@@ -57,12 +57,8 @@ final class TransactionType extends AbstractTrigger implements TriggerInterface$search = strtolower($this->triggerValue);if ($type == $search) {- Log::debug('Journal is of type "' . $type . '" which matches with "' . $search . '". Return true');-return true;}- Log::debug('Journal is of type "' . $type . '" which does not match with "' . $search . '". Return false');-return false;}}diff --git a/app/Rules/Triggers/UserAction.php b/app/Rules/Triggers/UserAction.phpindex a93d006340..1a2fefffed 100644--- a/app/Rules/Triggers/UserAction.php+++ b/app/Rules/Triggers/UserAction.php@@ -11,7 +11,6 @@ declare(strict_types = 1);namespace FireflyIII\Rules\Triggers;use FireflyIII\Models\TransactionJournal;-use Log;/*** Class UserAction@@ -51,8 +50,6 @@ final class UserAction extends AbstractTrigger implements TriggerInterface*/public function triggered(TransactionJournal $journal){- Log::debug('user_action always returns true.');-return true;}}