Some new phpDoc and refactoring.

This commit is contained in:
James Cole 2016-02-18 06:15:01 +01:00
parent 98fd5b8858
commit 1bcc975d7b
2 changed files with 6 additions and 4 deletions

View File

@ -375,6 +375,8 @@ class CategoryController extends Controller
}
/**
* Not the most elegant solution but it works.
*
* @param Collection $entries
*
* @return Collection

View File

@ -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