Remove unused exceptions.

This commit is contained in:
James Cole
2023-12-22 07:58:35 +01:00
parent b2bd9301b6
commit c60b5e5c21
81 changed files with 12 additions and 531 deletions

View File

@@ -35,8 +35,6 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use FireflyIII\Support\Export\ExportDataGenerator;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class ExportData
@@ -72,8 +70,6 @@ class ExportData extends Command
* Execute the console command.
*
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{

View File

@@ -32,8 +32,6 @@ use FireflyIII\Support\Cronjobs\BillWarningCronjob;
use FireflyIII\Support\Cronjobs\ExchangeRatesCronjob;
use FireflyIII\Support\Cronjobs\RecurringCronjob;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class Cron
@@ -49,10 +47,6 @@ class Cron extends Command
{--date= : Set the date in YYYY-MM-DD to make Firefly III think that\'s the current date.}
';
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
$date = null;
@@ -130,9 +124,7 @@ class Cron extends Command
}
/**
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
private function recurringCronJob(bool $force, ?Carbon $date): void
{
@@ -180,8 +172,6 @@ class Cron extends Command
/**
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function billWarningCronJob(bool $force, ?Carbon $date): void
{

View File

@@ -34,8 +34,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class AccountCurrencies
@@ -90,10 +88,6 @@ class AccountCurrencies extends Command
$this->count = 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -26,8 +26,6 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class AppendBudgetLimitPeriods
@@ -44,9 +42,6 @@ class AppendBudgetLimitPeriods extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -62,10 +57,6 @@ class AppendBudgetLimitPeriods extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -30,8 +30,6 @@ use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class BackToJournals
@@ -48,9 +46,6 @@ class BackToJournals extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -73,10 +68,6 @@ class BackToJournals extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isMigrated(): bool
{
$configVar = app('fireflyconfig')->get(MigrateToGroups::CONFIG_NAME, false);
@@ -84,10 +75,6 @@ class BackToJournals extends Command
return (bool)$configVar->data;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -29,8 +29,6 @@ use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\User;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class BudgetLimitCurrency
@@ -48,9 +46,7 @@ class BudgetLimitCurrency extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -91,10 +87,6 @@ class BudgetLimitCurrency extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -29,8 +29,6 @@ use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class CCLiabilities
@@ -46,9 +44,7 @@ class CCLiabilities extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -87,10 +83,6 @@ class CCLiabilities extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -29,8 +29,6 @@ use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Preference;
use Illuminate\Console\Command;
use Illuminate\Contracts\Encryption\DecryptException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class DecryptDatabase
@@ -44,9 +42,6 @@ class DecryptDatabase extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -75,10 +70,6 @@ class DecryptDatabase extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function decryptTable(string $table, array $fields): void
{
if ($this->isDecrypted($table)) {
@@ -95,10 +86,6 @@ class DecryptDatabase extends Command
app('fireflyconfig')->set($configName, true);
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isDecrypted(string $table): bool
{
$configName = sprintf('is_decrypted_%s', $table);

View File

@@ -28,8 +28,6 @@ use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Attachment;
use FireflyIII\Models\Note;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class MigrateAttachments
@@ -47,9 +45,7 @@ class MigrateAttachments extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -98,10 +94,6 @@ class MigrateAttachments extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -27,8 +27,6 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournalMeta;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class MigrateJournalNotes
@@ -45,9 +43,6 @@ class MigrateJournalNotes extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -93,10 +88,6 @@ class MigrateJournalNotes extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -29,8 +29,6 @@ use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceMeta;
use FireflyIII\Models\RecurrenceTransactionMeta;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class MigrateRecurrenceMeta
@@ -47,9 +45,6 @@ class MigrateRecurrenceMeta extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* * @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -72,22 +67,16 @@ class MigrateRecurrenceMeta extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
if (null !== $configVar) {
return (bool)$configVar->data;
return (bool) $configVar->data;
}
return false;
}
/**
* */
private function migrateMetaData(): int
{
$count = 0;
@@ -102,8 +91,6 @@ class MigrateRecurrenceMeta extends Command
return $count;
}
/**
* */
private function migrateEntry(RecurrenceMeta $meta): int
{
/** @var null|Recurrence $recurrence */

View File

@@ -29,8 +29,6 @@ use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceTransaction;
use FireflyIII\Models\TransactionType;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class MigrateRecurrenceType
@@ -47,9 +45,6 @@ class MigrateRecurrenceType extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -65,10 +60,6 @@ class MigrateRecurrenceType extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -28,8 +28,6 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Location;
use FireflyIII\Models\Tag;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class MigrateTagLocations
@@ -46,9 +44,6 @@ class MigrateTagLocations extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -63,10 +58,6 @@ class MigrateTagLocations extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -34,8 +34,6 @@ use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class MigrateToRules
@@ -58,9 +56,7 @@ class MigrateToRules extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -105,10 +101,6 @@ class MigrateToRules extends Command
$this->ruleRepository = app(RuleRepositoryInterface::class);
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -34,8 +34,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class OtherCurrenciesCorrections
@@ -55,9 +53,6 @@ class OtherCurrenciesCorrections extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -91,10 +86,6 @@ class OtherCurrenciesCorrections extends Command
$this->cliRepos = app(JournalCLIRepositoryInterface::class);
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -27,8 +27,6 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\AccountMeta;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class RenameAccountMeta
@@ -46,9 +44,7 @@ class RenameAccountMeta extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -89,10 +85,6 @@ class RenameAccountMeta extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -30,8 +30,6 @@ use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class TransactionIdentifier
@@ -56,9 +54,7 @@ class TransactionIdentifier extends Command
* When either of these are the same amount, FF3 can't keep them apart: +3/-3, +3/-3, +3/-3. This happens more
* often than you would think. So each set gets a number (1,2,3) to keep them apart.
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -105,10 +101,6 @@ class TransactionIdentifier extends Command
$this->count = 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -32,8 +32,6 @@ use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class TransferCurrenciesCorrections
@@ -59,9 +57,6 @@ class TransferCurrenciesCorrections extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -114,10 +109,6 @@ class TransferCurrenciesCorrections extends Command
$this->destinationCurrency = null;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -33,8 +33,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class UpgradeLiabilities
@@ -49,9 +47,6 @@ class UpgradeLiabilities extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -67,10 +62,6 @@ class UpgradeLiabilities extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);

View File

@@ -34,8 +34,6 @@ use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService;
use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User;
use Illuminate\Console\Command;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class UpgradeLiabilitiesEight
@@ -50,9 +48,6 @@ class UpgradeLiabilitiesEight extends Command
/**
* Execute the console command.
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{
@@ -67,10 +62,6 @@ class UpgradeLiabilitiesEight extends Command
return 0;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);