mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 04:21:20 +00:00
Basic logging for willMatchEverything #322
This commit is contained in:
@@ -13,6 +13,7 @@ namespace FireflyIII\Rules\Triggers;
|
||||
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class AmountMore
|
||||
@@ -41,9 +42,16 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
|
||||
public static function willMatchEverything($value = null)
|
||||
{
|
||||
if (!is_null($value)) {
|
||||
return bccomp('0', strval($value)) === 0;
|
||||
$res = bccomp('0', strval($value)) === 0;
|
||||
if ($res === true) {
|
||||
Log::error(sprintf('Cannot use %s with a value equal to 0.', self::class));
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
Log::error(sprintf('Cannot use %s with a null value.', self::class));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user