Skip to content

Firefly III: a personal finances manager

Remove debug comments.

James Cole09799582aa3f
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php
index d5c69df1d3..94bb51c858 100644
--- a/app/Helpers/Collector/GroupCollector.php
+++ b/app/Helpers/Collector/GroupCollector.php
@@ -433,7 +433,7 @@ class GroupCollector implements GroupCollectorInterface
*/
public function getGroups(): Collection
{
- Log::debug('Now in getGroups()');
+ // Log::debug('Now in getGroups()');
if ($this->expandGroupSearch) {
// get group ID's for the query:
$groupIds = $this->getCollectedGroupIds();
@@ -556,7 +556,7 @@ class GroupCollector implements GroupCollectorInterface
if (0 !== count($journalIds)) {
// make all integers.
$integerIDs = array_map(intval(...), $journalIds);
- Log::debug(sprintf('GroupCollector: setJournalIds: %s', implode(', ', $integerIDs)));
+ // Log::debug(sprintf('GroupCollector: setJournalIds: %s', implode(', ', $integerIDs)));
$this->query->whereIn('transaction_journals.id', $integerIDs);
}
diff --git a/app/Repositories/Budget/OperationsRepository.php b/app/Repositories/Budget/OperationsRepository.php
index 5d5ec67de9..194b837760 100644
--- a/app/Repositories/Budget/OperationsRepository.php
+++ b/app/Repositories/Budget/OperationsRepository.php
@@ -85,7 +85,7 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
?Collection $budgets = null,
?TransactionCurrency $currency = null
): array {
- Log::debug(sprintf('Start of %s(%s, %s, array, array, "%s").', __METHOD__, $start->toW3cString(), $end->toW3cString(), $currency?->code));
+ // Log::debug(sprintf('Start of %s(%s, %s, array, array, "%s").', __METHOD__, $start->toW3cString(), $end->toW3cString(), $currency?->code));
// this collector excludes all transfers TO liabilities (which are also withdrawals)
// because those expenses only become expenses once they move from the liability to the friend.
// 2024-12-24 disable the exclusion for now.
@@ -275,7 +275,7 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
TransactionCurrency $transactionCurrency,
bool $convertToPrimary = false
): array {
- Log::debug(sprintf('Start of %s.', __METHOD__));
+// Log::debug(sprintf('Start of %s.', __METHOD__));
$summarizer = new TransactionSummarizer($this->user);
$summarizer->setConvertToPrimary($convertToPrimary);
@@ -290,7 +290,7 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
public function sumCollectedExpensesByBudget(array $expenses, Budget $budget, bool $convertToPrimary = false): array
{
- Log::debug(sprintf('Start of %s.', __METHOD__));
+ // Log::debug(sprintf('Start of %s.', __METHOD__));
$summarizer = new TransactionSummarizer($this->user);
$summarizer->setConvertToPrimary($convertToPrimary);
@@ -311,7 +311,7 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
?TransactionCurrency $currency = null,
bool $convertToPrimary = false
): array {
- Log::debug(sprintf('Start of %s(date, date, array, array, "%s", %s).', __METHOD__, $currency?->code, var_export($convertToPrimary, true)));
+// Log::debug(sprintf('Start of %s(date, date, array, array, "%s", %s).', __METHOD__, $currency?->code, var_export($convertToPrimary, true)));
// this collector excludes all transfers TO liabilities (which are also withdrawals)
// because those expenses only become expenses once they move from the liability to the friend.
// 2024-12-24 disable the exclusion for now.
diff --git a/app/Repositories/Category/OperationsRepository.php b/app/Repositories/Category/OperationsRepository.php
index d54219dea3..5f03a698fd 100644
--- a/app/Repositories/Category/OperationsRepository.php
+++ b/app/Repositories/Category/OperationsRepository.php
@@ -372,7 +372,7 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn
public function sumCollectedTransactionsByCategory(array $expenses, Category $category, string $method, bool $convertToPrimary = false): array
{
- Log::debug(sprintf('Start of %s.', __METHOD__));
+// Log::debug(sprintf('Start of %s.', __METHOD__));
$summarizer = new TransactionSummarizer($this->user);
$summarizer->setConvertToPrimary($convertToPrimary);
diff --git a/app/Support/JsonApi/Enrichments/AccountEnrichment.php b/app/Support/JsonApi/Enrichments/AccountEnrichment.php
index 8d3ab26318..dc97241a89 100644
--- a/app/Support/JsonApi/Enrichments/AccountEnrichment.php
+++ b/app/Support/JsonApi/Enrichments/AccountEnrichment.php
@@ -92,7 +92,7 @@ class AccountEnrichment implements EnrichmentInterface
*/
public function enrich(Collection $collection): Collection
{
- Log::debug(sprintf('Now doing account enrichment for %d account(s)', $collection->count()));
+ // Log::debug(sprintf('Now doing account enrichment for %d account(s)', $collection->count()));
// prep local fields
$this->collection = $collection;
diff --git a/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php b/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php
index 87a375119b..f02bea026b 100644
--- a/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php
+++ b/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php
@@ -76,7 +76,7 @@ class TransactionGroupEnrichment implements EnrichmentInterface
#[Override]
public function enrich(Collection $collection): Collection
{
- Log::debug(sprintf('Now doing account enrichment for %d transaction group(s)', $collection->count()));
+ // Log::debug(sprintf('Now doing account enrichment for %d transaction group(s)', $collection->count()));
// prep local fields
$this->collection = $collection;
$this->collectJournalIds();
diff --git a/app/Support/Report/Summarizer/TransactionSummarizer.php b/app/Support/Report/Summarizer/TransactionSummarizer.php
index 921d897857..86baf1e6b4 100644
--- a/app/Support/Report/Summarizer/TransactionSummarizer.php
+++ b/app/Support/Report/Summarizer/TransactionSummarizer.php
@@ -45,7 +45,7 @@ class TransactionSummarizer
public function groupByCurrencyId(array $journals, string $method = 'negative', bool $includeForeign = true): array
{
- Log::debug(sprintf('Now in groupByCurrencyId([%d journals], "%s", %s)', count($journals), $method, var_export($includeForeign, true)));
+ // Log::debug(sprintf('Now in groupByCurrencyId([%d journals], "%s", %s)', count($journals), $method, var_export($includeForeign, true)));
$array = [];
foreach ($journals as $journal) {
$field = 'amount';
@@ -146,7 +146,7 @@ class TransactionSummarizer
// $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], \FireflyIII\Support\Facades\Steam::{$method}($amount));
// Log::debug(sprintf('Journal #%d adds amount %s %s', $journal['transaction_journal_id'], $currencyCode, $amount));
}
- Log::debug('End of sumExpenses.', $array);
+// Log::debug('End of sumExpenses.', $array);
return $array;
}
@@ -234,7 +234,7 @@ class TransactionSummarizer
public function setConvertToPrimary(bool $convertToPrimary): void
{
- Log::debug(sprintf('Overrule convertToPrimary to become %s', var_export($convertToPrimary, true)));
+ // Log::debug(sprintf('Overrule convertToPrimary to become %s', var_export($convertToPrimary, true)));
$this->convertToPrimary = $convertToPrimary;
}
diff --git a/app/Support/Request/ChecksLogin.php b/app/Support/Request/ChecksLogin.php
index 15dd960b8f..29dca80a3b 100644
--- a/app/Support/Request/ChecksLogin.php
+++ b/app/Support/Request/ChecksLogin.php
@@ -39,7 +39,7 @@ trait ChecksLogin
*/
public function authorize(): bool
{
- Log::debug(sprintf('Now in %s', __METHOD__));
+ // Log::debug(sprintf('Now in %s', __METHOD__));
// Only allow logged-in users
$check = auth()->check();
if (!$check) {
@@ -81,15 +81,15 @@ trait ChecksLogin
{
/** @var User $user */
$user = auth()->user();
- Log::debug('Now in getUserGroup()');
+ // Log::debug('Now in getUserGroup()');
/** @var null|UserGroup $userGroup */
$userGroup = $this->route()?->parameter('userGroup');
if (null === $userGroup) {
- Log::debug('Request class has no userGroup parameter, but perhaps there is a parameter.');
+ // Log::debug('Request class has no userGroup parameter, but perhaps there is a parameter.');
$userGroupId = (int) $this->get('user_group_id');
if (0 === $userGroupId) {
- Log::debug(sprintf('Request class has no user_group_id parameter, grab default from user (group #%d).', $user->user_group_id));
+ // Log::debug(sprintf('Request class has no user_group_id parameter, grab default from user (group #%d).', $user->user_group_id));
$userGroupId = (int) $user->user_group_id;
}
$userGroup = UserGroup::find($userGroupId);
@@ -98,7 +98,7 @@ trait ChecksLogin
return null;
}
- Log::debug('Request class has valid user_group_id.');
+ // Log::debug('Request class has valid user_group_id.');
}
return $userGroup;
diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php
index 1b6005b9ba..1345b4707a 100644
--- a/app/Support/Search/OperatorQuerySearch.php
+++ b/app/Support/Search/OperatorQuerySearch.php
@@ -122,11 +122,11 @@ class OperatorQuerySearch implements SearchInterface
if (str_starts_with($original, '-')) {
$return = sprintf('-%s', $config['alias_for']);
}
- Log::debug(sprintf('"%s" is an alias for "%s", so return that instead.', $original, $return));
+ // Log::debug(sprintf('"%s" is an alias for "%s", so return that instead.', $original, $return));
return $return;
}
- Log::debug(sprintf('"%s" is not an alias.', $operator));
+ // Log::debug(sprintf('"%s" is not an alias.', $operator));
return $original;
}
@@ -174,7 +174,7 @@ class OperatorQuerySearch implements SearchInterface
*/
public function parseQuery(string $query): void
{
- Log::debug(sprintf('Now in parseQuery("%s")', $query));
+ // Log::debug(sprintf('Now in parseQuery("%s")', $query));
/** @var QueryParserInterface $parser */
$parser = app(QueryParserInterface::class);
diff --git a/app/Support/Search/QueryParser/QueryParser.php b/app/Support/Search/QueryParser/QueryParser.php
index 6319dea7c9..7caeb2bd71 100644
--- a/app/Support/Search/QueryParser/QueryParser.php
+++ b/app/Support/Search/QueryParser/QueryParser.php
@@ -39,7 +39,7 @@ class QueryParser implements QueryParserInterface
public function parse(string $query): NodeGroup
{
- Log::debug(sprintf('Parsing query in QueryParser: "%s"', $query));
+ // Log::debug(sprintf('Parsing query in QueryParser: "%s"', $query));
$this->query = $query;
$this->position = 0;
@@ -78,7 +78,7 @@ class QueryParser implements QueryParserInterface
}
// char is "
++$this->position;
- Log::debug(sprintf('Constructed token: %s', $tokenUnderConstruction));
+ // Log::debug(sprintf('Constructed token: %s', $tokenUnderConstruction));
return new NodeResult($this->createNode($tokenUnderConstruction, $fieldName, $prohibited), false);
}