mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Remove JSON exceptions that are not thrown anyway.
This commit is contained in:
@@ -68,8 +68,7 @@ class AccountFactory
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function findOrCreate(string $accountName, string $accountType): Account
|
||||
{
|
||||
app('log')->debug(sprintf('findOrCreate("%s", "%s")', $accountName, $accountType));
|
||||
@@ -101,8 +100,7 @@ class AccountFactory
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function create(array $data): Account
|
||||
{
|
||||
app('log')->debug('Now in AccountFactory::create()');
|
||||
@@ -173,8 +171,7 @@ class AccountFactory
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
private function createAccount(AccountType $type, array $data): Account
|
||||
{
|
||||
$this->accountRepository->resetAccountOrder();
|
||||
@@ -242,8 +239,7 @@ class AccountFactory
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
private function cleanMetaDataArray(Account $account, array $data): array
|
||||
{
|
||||
$currencyId = array_key_exists('currency_id', $data) ? (int)$data['currency_id'] : 0;
|
||||
|
||||
@@ -43,8 +43,7 @@ class BillFactory
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function create(array $data): ?Bill
|
||||
{
|
||||
app('log')->debug(sprintf('Now in %s', __METHOD__), $data);
|
||||
|
||||
@@ -52,8 +52,7 @@ class RecurrenceFactory
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function create(array $data): Recurrence
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -49,8 +49,7 @@ class TransactionGroupFactory
|
||||
*
|
||||
* @throws DuplicateTransactionException
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
* */
|
||||
public function create(array $data): TransactionGroup
|
||||
{
|
||||
app('log')->debug('Now in TransactionGroupFactory::create()');
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user