Skip to content

Firefly III: a personal finances manager

Some new phpDoc and refactoring.

James Cole1bcc975d7b43
diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php
index 84cf3c1fed..409d20a21a 100644
--- a/app/Http/Controllers/Chart/CategoryController.php
+++ b/app/Http/Controllers/Chart/CategoryController.php
@@ -375,6 +375,8 @@ class CategoryController extends Controller
}
/**
+ * Not the most elegant solution but it works.
+ *
* @param Collection $entries
*
* @return Collection
diff --git a/app/Rules/TransactionMatcher.php b/app/Rules/TransactionMatcher.php
index dbfbabdbcd..521ca38539 100644
--- a/app/Rules/TransactionMatcher.php
+++ b/app/Rules/TransactionMatcher.php
@@ -74,10 +74,10 @@ class TransactionMatcher
$processed += count($set);
// Check for conditions to finish the loop
- $reachedEndOfList = (count($set) < $pagesize);
- $foundEnoughTransactions = (count($result) >= $this->limit);
- $searchedEnoughTransactions = ($processed >= $this->range);
- } while (!$reachedEndOfList && !$foundEnoughTransactions && !$searchedEnoughTransactions);
+ $reachedEndOfList = $set->count() < $pagesize;
+ $foundEnough = $result->count() >= $this->limit;
+ $searchedEnough = ($processed >= $this->range);
+ } while (!$reachedEndOfList && !$foundEnough && !$searchedEnough);
// If the list of matchingTransactions is larger than the maximum number of results
// (e.g. if a large percentage of the transactions match), truncate the list