Refactor code.

This commit is contained in:
James Cole
2020-11-08 14:13:21 +01:00
parent ec44d0dc8e
commit 0f32761ae8
34 changed files with 45 additions and 750 deletions

View File

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