Remove static references

This commit is contained in:
James Cole
2023-10-29 06:32:00 +01:00
parent e65d0eef6e
commit 075d459b7c
128 changed files with 391 additions and 391 deletions

View File

@@ -107,7 +107,7 @@ class StoreController extends Controller
$helper = app(AttachmentHelperInterface::class);
$body = $request->getContent();
if ('' === $body) {
Log::error('Body of attachment is empty.');
app('log')->error('Body of attachment is empty.');
return response()->json([], 422);
}

View File

@@ -101,7 +101,7 @@ class StoreController extends Controller
throw new ValidationException($validator, 0, $e);
} catch (FireflyException $e) {
app('log')->warning('Caught an exception. Return error message.');
Log::error($e->getMessage());
app('log')->error($e->getMessage());
$message = sprintf('Internal exception: %s', $e->getMessage());
$validator = Validator::make(['transactions' => [['description' => $message]]], ['transactions.0.description' => new IsDuplicateTransaction()]);
throw new ValidationException($validator, 0, $e);