From b3e32db073d4bef2e0f26e6b431615118532b500 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 17 Feb 2016 20:23:14 +0100 Subject: [PATCH] Rename variables. --- app/Http/Controllers/RuleController.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/RuleController.php b/app/Http/Controllers/RuleController.php index 8aedfa430c..43c5ae6beb 100644 --- a/app/Http/Controllers/RuleController.php +++ b/app/Http/Controllers/RuleController.php @@ -277,24 +277,21 @@ class RuleController extends Controller return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]); } - // We start searching for transactions. For performance reasons, there are limits - // to the search: a maximum number of results and a maximum number of transactions - // to search in - $maxResults = Config::get('firefly.test-triggers.limit'); - $maxTransactionsToSearchIn = Config::get('firefly.test-triggers.max_transactions_to_analyse'); + $limit = Config::get('firefly.test-triggers.limit'); + $range = Config::get('firefly.test-triggers.range'); // Dispatch the actual work to a matched object $matchingTransactions = (new TransactionMatcher($triggers)) - ->setTransactionLimit($maxTransactionsToSearchIn) - ->findMatchingTransactions($maxResults); + ->setTransactionLimit($range) + ->findMatchingTransactions($limit); // Warn the user if only a subset of transactions is returned - if (count($matchingTransactions) == $maxResults) { - $warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $maxResults]); + if (count($matchingTransactions) == $limit) { + $warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $limit]); } else { 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 { $warning = ""; }