mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	More code for the split journal support.
This commit is contained in:
		| @@ -57,6 +57,21 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param int $piggyBankid | ||||
|      * | ||||
|      * @return PiggyBank | ||||
|      */ | ||||
|     public function find(int $piggyBankid): PiggyBank | ||||
|     { | ||||
|         $piggyBank = $this->user->piggyBanks()->where('piggy_banks.id', $piggyBankid)->first(['piggy_banks.*']); | ||||
|         if (!is_null($piggyBank)) { | ||||
|             return $piggyBank; | ||||
|         } | ||||
|  | ||||
|         return new PiggyBank(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param PiggyBank $piggyBank | ||||
|      * | ||||
|   | ||||
| @@ -34,6 +34,13 @@ interface PiggyBankRepositoryInterface | ||||
|      */ | ||||
|     public function destroy(PiggyBank $piggyBank): bool; | ||||
|  | ||||
|     /** | ||||
|      * @param int $piggyBankid | ||||
|      * | ||||
|      * @return PiggyBank | ||||
|      */ | ||||
|     public function find(int $piggyBankid): PiggyBank; | ||||
|  | ||||
|     /** | ||||
|      * Get all events. | ||||
|      * | ||||
|   | ||||
		Reference in New Issue
	
	Block a user