mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-25 00:20:41 -06:00
563ede822f
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
41 lines
842 B
PHP
41 lines
842 B
PHP
<?php
|
|
/**
|
|
* ScanForBillsAfterStore.php
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
*
|
|
* This software may be modified and distributed under the terms
|
|
* of the MIT license. See the LICENSE file for details.
|
|
*/
|
|
|
|
declare(strict_types = 1);
|
|
|
|
namespace FireflyIII\Handlers\Events;
|
|
|
|
use FireflyIII\Events\TransactionJournalStored;
|
|
use FireflyIII\Support\Events\BillScanner;
|
|
|
|
/**
|
|
* Class RescanJournal
|
|
*
|
|
* @package FireflyIII\Handlers\Events
|
|
*/
|
|
class ScanForBillsAfterStore
|
|
{
|
|
|
|
/**
|
|
* Scan a transaction journal for possible links to bills, right after storing.
|
|
*
|
|
* @param TransactionJournalStored $event
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function handle(TransactionJournalStored $event): bool
|
|
{
|
|
$journal = $event->journal;
|
|
BillScanner::scan($journal);
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|