Remove phpstan comments.

This commit is contained in:
James Cole
2022-10-31 05:40:59 +01:00
parent b57785a234
commit 4e618a4d0b
88 changed files with 177 additions and 179 deletions

View File

@@ -70,7 +70,7 @@ class AccountDestroyService
// delete account.
try {
$account->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}
@@ -122,7 +122,7 @@ class AccountDestroyService
$collection = Transaction::groupBy('transaction_journal_id', 'account_id')
->where('account_id', $moveTo->id)
->get(['transaction_journal_id', 'account_id', DB::raw('count(*) as the_count')]); // @phpstan-ignore-line
->get(['transaction_journal_id', 'account_id', DB::raw('count(*) as the_count')]);
if (0 === $collection->count()) {
return;
}

View File

@@ -39,7 +39,7 @@ class BillDestroyService
{
try {
$bill->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -41,7 +41,7 @@ class BudgetDestroyService
{
try {
$budget->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}

View File

@@ -41,7 +41,7 @@ class CategoryDestroyService
{
try {
$category->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}

View File

@@ -40,7 +40,7 @@ class CurrencyDestroyService
{
try {
$currency->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -95,7 +95,7 @@ class JournalDestroyService
$group->delete();
}
}
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -58,7 +58,7 @@ class RecurrenceDestroyService
try {
// delete all meta data
$recurrence->recurrenceMeta()->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
// delete all transactions.
@@ -67,7 +67,7 @@ class RecurrenceDestroyService
$transaction->recurrenceTransactionMeta()->delete();
try {
$transaction->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}
@@ -77,7 +77,7 @@ class RecurrenceDestroyService
// delete recurrence
try {
$recurrence->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -45,7 +45,7 @@ class TransactionGroupDestroyService
}
try {
$transactionGroup->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -174,7 +174,7 @@ trait AccountServiceTrait
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -72,7 +72,7 @@ trait BillServiceTrait
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -397,7 +397,7 @@ trait JournalServiceTrait
// try to delete existing notes.
try {
$note->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -62,7 +62,7 @@ trait RecurringTransactionTrait
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}
@@ -377,7 +377,7 @@ trait RecurringTransactionTrait
$transaction->recurrenceTransactionMeta()->delete();
try {
$transaction->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -155,7 +155,7 @@ class CategoryUpdateService
if (null !== $dbNote) {
try {
$dbNote->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -640,7 +640,7 @@ class JournalUpdateService
if ($this->hasFields([$field])) {
try {
$value = '' === (string) $this->data[$field] ? null : new Carbon($this->data[$field]);
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
Log::debug(sprintf('%s is not a valid date value: %s', $this->data[$field], $e->getMessage()));
return;

View File

@@ -134,7 +134,7 @@ class RecurrenceUpdateService
if (null !== $dbNote && '' === $text) {
try {
$dbNote->delete();
} catch (Exception $e) { // @phpstan-ignore-line
} catch (Exception $e) {
// @ignoreException
}
}

View File

@@ -73,7 +73,7 @@ class PwndVerifierV2 implements Verifier
}
try {
$strpos = stripos($res->getBody()->getContents(), $rest);
} catch (RuntimeException $e) { // @phpstan-ignore-line
} catch (RuntimeException $e) {
Log::error(sprintf('Could not get body from Pwnd result: %s', $e->getMessage()));
$strpos = false;
}