mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Rename variables.
This commit is contained in:
@@ -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 = "";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user