mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various code cleanup [skip ci]
This commit is contained in:
@@ -63,7 +63,7 @@ class AccountDestroyService
|
||||
try {
|
||||
$account->delete();
|
||||
} catch (Exception $e) { // @codeCoverageIgnore
|
||||
Log::error(sprintf('Could not delete account: %s',$e->getMessage())); // @codeCoverageIgnore
|
||||
Log::error(sprintf('Could not delete account: %s', $e->getMessage())); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Services\Internal\Destroy;
|
||||
use Exception;
|
||||
use FireflyIII\Models\Bill;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class BillDestroyService
|
||||
@@ -40,7 +41,7 @@ class BillDestroyService
|
||||
try {
|
||||
$bill->delete();
|
||||
} catch (Exception $e) { // @codeCoverageIgnore
|
||||
Log::error(sprintf('Could not delete bill: %s',$e->getMessage())); // @codeCoverageIgnore
|
||||
Log::error(sprintf('Could not delete bill: %s', $e->getMessage())); // @codeCoverageIgnore
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class JournalDestroyService
|
||||
}
|
||||
$journal->delete();
|
||||
} catch (Exception $e) {
|
||||
Log::error(sprintf('Could not delete bill: %s',$e->getMessage())); // @codeCoverageIgnore
|
||||
Log::error(sprintf('Could not delete bill: %s', $e->getMessage())); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Internal\Support;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Factory\AccountFactory;
|
||||
use FireflyIII\Factory\AccountMetaFactory;
|
||||
use FireflyIII\Factory\TransactionFactory;
|
||||
@@ -255,6 +254,7 @@ trait AccountServiceTrait
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return true; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Internal\Support;
|
||||
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Models\Note;
|
||||
|
||||
|
||||
@@ -217,6 +217,7 @@ trait TransactionServiceTrait
|
||||
{
|
||||
if (is_null($budget)) {
|
||||
$transaction->budgets()->sync([]);
|
||||
|
||||
return;
|
||||
}
|
||||
$transaction->budgets()->sync([$budget->id]);
|
||||
@@ -233,6 +234,7 @@ trait TransactionServiceTrait
|
||||
{
|
||||
if (is_null($category)) {
|
||||
$transaction->categories()->sync([]);
|
||||
|
||||
return;
|
||||
}
|
||||
$transaction->categories()->sync([$category->id]);
|
||||
@@ -260,6 +262,7 @@ trait TransactionServiceTrait
|
||||
if (is_null($currency)) {
|
||||
$transaction->foreign_currency_id = null;
|
||||
$transaction->save();
|
||||
|
||||
return;
|
||||
}
|
||||
$transaction->foreign_currency_id = $currency->id;
|
||||
|
||||
@@ -23,14 +23,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Internal\Update;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\AccountMetaFactory;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountMeta;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Services\Internal\Support\AccountServiceTrait;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class AccountUpdateService
|
||||
@@ -40,7 +34,6 @@ class AccountUpdateService
|
||||
use AccountServiceTrait;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update account data.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user