Remove JSON exceptions that are not thrown anyway.

This commit is contained in:
James Cole
2023-12-22 07:47:13 +01:00
parent 34e22e0747
commit 58dea55d38
52 changed files with 105 additions and 211 deletions

View File

@@ -91,8 +91,7 @@ class TransactionJournalFactory
*
* @throws DuplicateTransactionException
* @throws FireflyException
* @throws \JsonException
*/
* */
public function create(array $data): Collection
{
app('log')->debug('Now in TransactionJournalFactory::create()');
@@ -185,8 +184,7 @@ class TransactionJournalFactory
/**
* @throws DuplicateTransactionException
* @throws FireflyException
* @throws \JsonException
*/
* */
private function createJournal(NullArrayObject $row): ?TransactionJournal
{
$row['import_hash_v2'] = $this->hashArray($row);
@@ -346,8 +344,7 @@ class TransactionJournalFactory
}
/**
* @throws \JsonException
*/
* */
private function hashArray(NullArrayObject $row): string
{
$dataRow = $row->getArrayCopy();
@@ -364,8 +361,7 @@ class TransactionJournalFactory
* If this transaction already exists, throw an error.
*
* @throws DuplicateTransactionException
* @throws \JsonException
*/
* */
private function errorIfDuplicate(string $hash): void
{
app('log')->debug(sprintf('In errorIfDuplicate(%s)', $hash));
@@ -463,8 +459,7 @@ class TransactionJournalFactory
/**
* @throws FireflyException
* @throws \JsonException
*/
* */
private function getCurrencyByAccount(string $type, ?TransactionCurrency $currency, Account $source, Account $destination): TransactionCurrency
{
app('log')->debug('Now in getCurrencyByAccount()');
@@ -477,8 +472,7 @@ class TransactionJournalFactory
/**
* @throws FireflyException
* @throws \JsonException
*/
* */
private function getCurrency(?TransactionCurrency $currency, Account $account): TransactionCurrency
{
app('log')->debug('Now in getCurrency()');
@@ -512,8 +506,7 @@ class TransactionJournalFactory
/**
* @throws FireflyException
* @throws \JsonException
*/
* */
private function getForeignByAccount(string $type, ?TransactionCurrency $foreignCurrency, Account $destination): ?TransactionCurrency
{
if (TransactionType::TRANSFER === $type) {