Clean up code.

This commit is contained in:
James Cole
2023-02-12 07:23:57 +01:00
parent 927d607b1a
commit 789935cf1c
67 changed files with 154 additions and 156 deletions

View File

@@ -221,7 +221,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
$user = auth()->user();
$route = $request->route();
$attachmentId = (int)$route->parameter('attachment');
/** @var Attachment $attachment */
/** @var Attachment|null $attachment */
$attachment = $user->attachments()->withTrashed()->find($attachmentId);
if (null === $attachment) {
Log::error(sprintf('Could not find attachment %d, so give big fat error.', $attachmentId));