mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Refactor code.
This commit is contained in:
@@ -53,25 +53,13 @@ use Log;
|
||||
*/
|
||||
class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
||||
{
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if ('testing' === config('app.env')) {
|
||||
app('log')->warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
|
||||
}
|
||||
}
|
||||
private User $user;
|
||||
|
||||
/**
|
||||
* @param TransactionGroup $group
|
||||
*/
|
||||
public function destroy(TransactionGroup $group): void
|
||||
{
|
||||
/** @var TransactionGroupDestroyService $service */
|
||||
$service = new TransactionGroupDestroyService;
|
||||
$service->destroy($group);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user