Rename variables.

This commit is contained in:
James Cole
2016-02-17 20:23:14 +01:00
parent 01d53bdb85
commit b3e32db073

View File

@@ -277,24 +277,21 @@ class RuleController extends Controller
return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]); return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]);
} }
// We start searching for transactions. For performance reasons, there are limits $limit = Config::get('firefly.test-triggers.limit');
// to the search: a maximum number of results and a maximum number of transactions $range = Config::get('firefly.test-triggers.range');
// to search in
$maxResults = Config::get('firefly.test-triggers.limit');
$maxTransactionsToSearchIn = Config::get('firefly.test-triggers.max_transactions_to_analyse');
// Dispatch the actual work to a matched object // Dispatch the actual work to a matched object
$matchingTransactions $matchingTransactions
= (new TransactionMatcher($triggers)) = (new TransactionMatcher($triggers))
->setTransactionLimit($maxTransactionsToSearchIn) ->setTransactionLimit($range)
->findMatchingTransactions($maxResults); ->findMatchingTransactions($limit);
// Warn the user if only a subset of transactions is returned // Warn the user if only a subset of transactions is returned
if (count($matchingTransactions) == $maxResults) { if (count($matchingTransactions) == $limit) {
$warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $maxResults]); $warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $limit]);
} else { } else {
if (count($matchingTransactions) == 0) { if (count($matchingTransactions) == 0) {
$warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $maxTransactionsToSearchIn]); $warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $range]);
} else { } else {
$warning = ""; $warning = "";
} }