This commit is contained in:
James Cole
2020-07-11 15:13:15 +02:00
parent 86600d4fcf
commit 54d92f5b39
20 changed files with 737 additions and 205 deletions

View File

@@ -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();
}
}

View File

@@ -43,6 +43,11 @@ interface BillRepositoryInterface
*/
public function setObjectGroup(Bill $bill, string $objectGroupTitle): Bill;
/**
*
*/
public function destroyAll(): void;
/**
* @param Bill $bill
*