Small code cleanup.

This commit is contained in:
James Cole
2017-02-11 15:52:55 +01:00
parent fb73baca6a
commit 4c2d9e0eee
8 changed files with 11 additions and 30 deletions

View File

@@ -60,7 +60,7 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
{
$amount = $journal->destination_amount ?? TransactionJournal::amountPositive($journal);
$compare = $this->triggerValue;
$result = bccomp($amount, $compare, 4);
$result = bccomp($amount, $compare);
if ($result === 0) {
Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %d matches %d exactly, so return true', $journal->id, $amount, $compare));

View File

@@ -60,7 +60,7 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface
{
$amount = $journal->destination_amount ?? TransactionJournal::amountPositive($journal);
$compare = $this->triggerValue;
$result = bccomp($amount, $compare, 4);
$result = bccomp($amount, $compare);
if ($result === -1) {
Log::debug(sprintf('RuleTrigger AmountLess for journal #%d: %d is less than %d, so return true', $journal->id, $amount, $compare));

View File

@@ -66,7 +66,7 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
{
$amount = $journal->destination_amount ?? TransactionJournal::amountPositive($journal);
$compare = $this->triggerValue;
$result = bccomp($amount, $compare, 4);
$result = bccomp($amount, $compare);
if ($result === 1) {
Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %d is more than %d, so return true', $journal->id, $amount, $compare));