Refactor rule processor so it's testable.

This commit is contained in:
James Cole
2018-08-24 17:57:34 +02:00
parent 850a0ae17e
commit 835a421909
10 changed files with 202 additions and 122 deletions

View File

@@ -93,8 +93,10 @@ class TransactionMatcher
}
// Variables used within the loop
$processor = Processor::makeFromStringArray($this->triggers);
$result = $this->runProcessor($processor);
/** @var Processor $processor */
$processor = app(Processor::class);
$processor->makeFromStringArray($this->triggers);
$result = $this->runProcessor($processor);
// 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