Files
firefly-iii/app/Handlers/Events/ScanForBillsAfterUpdate.php

40 lines
850 B
PHP
Raw Normal View History

2016-01-13 07:16:29 +01:00
<?php
/**
* ScanForBillsAfterUpdate.php
2016-04-01 16:44:46 +02:00
* Copyright (C) 2016 thegrumpydictator@gmail.com
2016-01-13 07:16:29 +01:00
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
2016-01-13 07:16:29 +01:00
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\TransactionJournalUpdated;
2016-01-29 07:29:21 +01:00
use FireflyIII\Support\Events\BillScanner;
2016-01-13 07:16:29 +01:00
/**
* Class RescanJournal
*
* @package FireflyIII\Handlers\Events
*/
class ScanForBillsAfterUpdate
{
/**
* Scan a transaction journal for possibly related bills after it has been updated.
*
* @param TransactionJournalUpdated $event
*
2016-02-18 07:21:48 +01:00
* @return bool
2016-01-13 07:16:29 +01:00
*/
2016-02-18 07:21:48 +01:00
public function handle(TransactionJournalUpdated $event): bool
2016-01-13 07:16:29 +01:00
{
$journal = $event->journal;
2016-01-29 07:29:21 +01:00
BillScanner::scan($journal);
2016-02-18 07:21:48 +01:00
return true;
2016-01-13 07:16:29 +01:00
}
}