Clean up code.

This commit is contained in:
James Cole
2023-12-10 06:51:59 +01:00
parent c2b22a2bac
commit 46e130fdfe
195 changed files with 973 additions and 984 deletions

View File

@@ -164,19 +164,6 @@ class IsValidAttachmentModel implements ValidationRule
return null !== $repository->find($value);
}
/**
* @param int $value
*
* @return bool
*/
private function validateJournal(int $value): bool
{
$repository = app(JournalRepositoryInterface::class);
$repository->setUser(auth()->user());
return null !== $repository->find($value);
}
/**
* @param int $value
*
@@ -218,4 +205,17 @@ class IsValidAttachmentModel implements ValidationRule
return null !== $repository->findTransaction($value);
}
/**
* @param int $value
*
* @return bool
*/
private function validateJournal(int $value): bool
{
$repository = app(JournalRepositoryInterface::class);
$repository->setUser(auth()->user());
return null !== $repository->find($value);
}
}