mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			850 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			850 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * ScanForBillsAfterUpdate.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\TransactionJournalUpdated;
 | |
| use FireflyIII\Support\Events\BillScanner;
 | |
| 
 | |
| /**
 | |
|  * Class RescanJournal
 | |
|  *
 | |
|  * @package FireflyIII\Handlers\Events
 | |
|  */
 | |
| class ScanForBillsAfterUpdate
 | |
| {
 | |
|     /**
 | |
|      * Scan a transaction journal for possibly related bills after it has been updated.
 | |
|      *
 | |
|      * @param  TransactionJournalUpdated $event
 | |
|      *
 | |
|      * @return bool
 | |
|      */
 | |
|     public function handle(TransactionJournalUpdated $event): bool
 | |
|     {
 | |
|         $journal = $event->journal;
 | |
|         BillScanner::scan($journal);
 | |
| 
 | |
|         return true;
 | |
|     }
 | |
| 
 | |
| }
 |