mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Code for #3546
This commit is contained in:
@@ -50,8 +50,7 @@ use Storage;
|
||||
class BillRepository implements BillRepositoryInterface
|
||||
{
|
||||
use CreatesObjectGroups;
|
||||
/** @var User */
|
||||
private $user;
|
||||
private User $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -764,4 +763,12 @@ class BillRepository implements BillRepositoryInterface
|
||||
$bill->order = $order;
|
||||
$bill->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function destroyAll(): void
|
||||
{
|
||||
$this->user->bills()->delete();
|
||||
}
|
||||
}
|
||||
|
@@ -43,6 +43,11 @@ interface BillRepositoryInterface
|
||||
*/
|
||||
public function setObjectGroup(Bill $bill, string $objectGroupTitle): Bill;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function destroyAll(): void;
|
||||
|
||||
/**
|
||||
* @param Bill $bill
|
||||
*
|
||||
|
Reference in New Issue
Block a user