Remove static references

This commit is contained in:
James Cole
2023-10-29 06:32:00 +01:00
parent e65d0eef6e
commit 075d459b7c
128 changed files with 391 additions and 391 deletions

View File

@@ -298,8 +298,8 @@ trait AccountServiceTrait
try {
$group = $factory->create($submission);
} catch (DuplicateTransactionException $e) {
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
app('log')->error($e->getMessage());
app('log')->error($e->getTraceAsString());
throw new FireflyException($e->getMessage(), 0, $e);
}
@@ -543,8 +543,8 @@ trait AccountServiceTrait
try {
$group = $factory->create($submission);
} catch (DuplicateTransactionException $e) {
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
app('log')->error($e->getMessage());
app('log')->error($e->getTraceAsString());
throw new FireflyException($e->getMessage(), 0, $e);
}
@@ -758,8 +758,8 @@ trait AccountServiceTrait
try {
$group = $factory->create($submission);
} catch (DuplicateTransactionException $e) {
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
app('log')->error($e->getMessage());
app('log')->error($e->getTraceAsString());
throw new FireflyException($e->getMessage(), 0, $e);
}

View File

@@ -85,8 +85,8 @@ class CreditRecalculateService
try {
$this->findByJournal($journal);
} catch (FireflyException $e) {
Log::error($e->getTraceAsString());
Log::error(sprintf('Could not find work account for transaction group #%d.', $this->group->id));
app('log')->error($e->getTraceAsString());
app('log')->error(sprintf('Could not find work account for transaction group #%d.', $this->group->id));
}
}
}

View File

@@ -222,7 +222,7 @@ trait RecurringTransactionTrait
try {
$result = $factory->findOrCreate($accountName, $expectedType);
} catch (FireflyException $e) {
Log::error($e->getMessage());
app('log')->error($e->getMessage());
}
}
}

View File

@@ -48,7 +48,7 @@ trait TransactionTypeTrait
$factory = app(TransactionTypeFactory::class);
$transactionType = $factory->find($type);
if (null === $transactionType) {
Log::error(sprintf('Could not find transaction type for "%s"', $type));
app('log')->error(sprintf('Could not find transaction type for "%s"', $type));
throw new FireflyException(sprintf('Could not find transaction type for "%s"', $type));
}