Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -38,9 +38,6 @@ class AttachmentFactory
private User $user;
/**
* @param array $data
*
* @return Attachment|null
* @throws FireflyException
*/
public function create(array $data): ?Attachment
@@ -51,7 +48,7 @@ class AttachmentFactory
// get journal instead of transaction.
if (Transaction::class === $model) {
/** @var Transaction|null $transaction */
/** @var null|Transaction $transaction */
$transaction = $this->user->transactions()->find((int)$data['attachable_id']);
if (null === $transaction) {
throw new FireflyException('Unexpectedly could not find transaction');
@@ -86,9 +83,6 @@ class AttachmentFactory
return $attachment;
}
/**
* @param User $user
*/
public function setUser(User $user): void
{
$this->user = $user;