mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 12:43:57 -06:00
Add debug logging.
This commit is contained in:
parent
5722622251
commit
82dc0d4aac
@ -198,33 +198,40 @@ class Search implements SearchInterface
|
||||
case 'amount_is':
|
||||
case 'amount':
|
||||
$amount = app('steam')->positive(strval($modifier['value']));
|
||||
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $amount);
|
||||
$collector->amountIs($amount);
|
||||
break;
|
||||
case 'amount_min':
|
||||
case 'amount_less':
|
||||
$amount = app('steam')->positive(strval($modifier['value']));
|
||||
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $amount);
|
||||
$collector->amountLess($amount);
|
||||
break;
|
||||
case 'amount_max':
|
||||
case 'amount_more':
|
||||
$amount = app('steam')->positive(strval($modifier['value']));
|
||||
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $amount);
|
||||
$collector->amountMore($amount);
|
||||
break;
|
||||
case 'type':
|
||||
$collector->setTypes([ucfirst($modifier['value'])]);
|
||||
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
|
||||
break;
|
||||
case 'date':
|
||||
case 'on':
|
||||
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
|
||||
$start = new Carbon($modifier['value']);
|
||||
$collector->setRange($start, $start);
|
||||
break;
|
||||
case 'date_before':
|
||||
case 'before':
|
||||
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
|
||||
$before = new Carbon($modifier['value']);
|
||||
$collector->setBefore($before);
|
||||
break;
|
||||
case 'date_after':
|
||||
case 'after':
|
||||
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
|
||||
$after = new Carbon($modifier['value']);
|
||||
$collector->setBefore($after);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user