Clean up code, remove unused methods.

This commit is contained in:
James Cole
2018-07-22 16:35:46 +02:00
parent dbbf0ff5e4
commit a722dc4235
43 changed files with 210 additions and 566 deletions

View File

@@ -78,7 +78,10 @@ class Attachment extends Model
{
if (auth()->check()) {
$attachmentId = (int)$value;
$attachment = auth()->user()->attachments()->find($attachmentId);
/** @var User $user */
$user = auth()->user();
/** @var Attachment $attachment */
$attachment = $user->attachments()->find($attachmentId);
if (null !== $attachment) {
return $attachment;
}