mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
New converters for #180 (Bill)
This commit is contained in:
@@ -49,6 +49,23 @@ class BillRepository implements BillRepositoryInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a bill by ID.
|
||||
*
|
||||
* @param int $billId
|
||||
*
|
||||
* @return Bill
|
||||
*/
|
||||
public function find(int $billId) : Bill
|
||||
{
|
||||
$bill = $this->user->bills()->find($billId);
|
||||
if (is_null($bill)) {
|
||||
$bill = new Bill;
|
||||
}
|
||||
|
||||
return $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
|
@@ -23,6 +23,15 @@ interface BillRepositoryInterface
|
||||
*/
|
||||
public function destroy(Bill $bill): bool;
|
||||
|
||||
/**
|
||||
* Find a bill by ID.
|
||||
*
|
||||
* @param int $billId
|
||||
*
|
||||
* @return Bill
|
||||
*/
|
||||
public function find(int $billId) : Bill;
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
|
Reference in New Issue
Block a user