Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:10:05 +02:00
parent 60786461a9
commit 123693096c
134 changed files with 336 additions and 141 deletions

View File

@@ -74,6 +74,7 @@ class AccountFactory
*
* @return Account
* @throws FireflyException
* @throws JsonException
*/
public function findOrCreate(string $accountName, string $accountType): Account
{
@@ -182,6 +183,7 @@ class AccountFactory
* @param array $data
*
* @return Account
* @throws FireflyException
* @throws JsonException
*/
private function createAccount(AccountType $type, array $data): Account
@@ -361,7 +363,6 @@ class AccountFactory
* @param array $data
*
* @throws FireflyException
* @throws JsonException
*/
private function storeOrder(Account $account, array $data): void
{

View File

@@ -58,11 +58,9 @@ class AccountMetaFactory
}
// if $data has field and $entry is not null, update $entry:
if (null !== $entry) {
$entry->data = $value;
$entry->save();
Log::debug(sprintf('Updated meta-field "%s":"%s" for #%d ("%s") ', $field, $value, $account->id, $account->name));
}
$entry->data = $value;
$entry->save();
Log::debug(sprintf('Updated meta-field "%s":"%s" for #%d ("%s") ', $field, $value, $account->id, $account->name));
}
if ('' === $value && null !== $entry) {
try {

View File

@@ -46,6 +46,7 @@ class BillFactory
*
* @return Bill|null
* @throws FireflyException
* @throws \JsonException
*/
public function create(array $data): ?Bill
{

View File

@@ -57,6 +57,7 @@ class TransactionGroupFactory
* @return TransactionGroup
* @throws DuplicateTransactionException
* @throws FireflyException
* @throws \JsonException
*/
public function create(array $data): TransactionGroup
{

View File

@@ -417,6 +417,8 @@ class TransactionJournalFactory
* @param Account $account
*
* @return TransactionCurrency
* @throws FireflyException
* @throws JsonException
*/
private function getCurrency(?TransactionCurrency $currency, Account $account): TransactionCurrency
{