Code cleanup.

This commit is contained in:
James Cole 2021-03-28 11:43:07 +02:00
parent 5abbb8a807
commit 2c575f3ca5
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
379 changed files with 304 additions and 1727 deletions

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
use Artisan; use Artisan;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Schema; use Schema;
@ -48,7 +47,6 @@ class CorrectDatabase extends Command
*/ */
protected $signature = 'firefly-iii:correct-database'; protected $signature = 'firefly-iii:correct-database';
/** /**
* Execute the console command. * Execute the console command.
*/ */

View File

@ -53,7 +53,6 @@ class CorrectOpeningBalanceCurrencies extends Command
*/ */
protected $signature = 'firefly-iii:fix-ob-currencies'; protected $signature = 'firefly-iii:fix-ob-currencies';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -46,7 +46,6 @@ class CreateAccessTokens extends Command
*/ */
protected $signature = 'firefly-iii:create-access-tokens'; protected $signature = 'firefly-iii:create-access-tokens';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -44,7 +44,6 @@ class CreateLinkTypes extends Command
*/ */
protected $signature = 'firefly-iii:create-link-types'; protected $signature = 'firefly-iii:create-link-types';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -46,7 +46,6 @@ class DeleteEmptyGroups extends Command
*/ */
protected $signature = 'firefly-iii:delete-empty-groups'; protected $signature = 'firefly-iii:delete-empty-groups';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -48,7 +48,6 @@ class DeleteEmptyJournals extends Command
*/ */
protected $signature = 'firefly-iii:delete-empty-journals'; protected $signature = 'firefly-iii:delete-empty-journals';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -48,7 +48,6 @@ class DeleteOrphanedTransactions extends Command
*/ */
protected $signature = 'firefly-iii:delete-orphaned-transactions'; protected $signature = 'firefly-iii:delete-orphaned-transactions';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -47,7 +47,6 @@ class DeleteZeroAmount extends Command
*/ */
protected $signature = 'firefly-iii:delete-zero-amount'; protected $signature = 'firefly-iii:delete-zero-amount';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -50,7 +50,6 @@ class EnableCurrencies extends Command
*/ */
protected $signature = 'firefly-iii:enable-currencies'; protected $signature = 'firefly-iii:enable-currencies';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -47,7 +47,6 @@ class FixAccountOrder extends Command
private AccountRepositoryInterface $repository; private AccountRepositoryInterface $repository;
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -53,7 +53,6 @@ class FixAccountTypes extends Command
private array $expected; private array $expected;
private AccountFactory $factory; private AccountFactory $factory;
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -49,7 +49,6 @@ class FixGroupAccounts extends Command
*/ */
protected $signature = 'firefly-iii:unify-group-accounts'; protected $signature = 'firefly-iii:unify-group-accounts';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -75,7 +74,6 @@ class FixGroupAccounts extends Command
$this->line('Updated inconsistent transaction groups.'); $this->line('Updated inconsistent transaction groups.');
return 0; return 0;
} }
} }

View File

@ -47,7 +47,6 @@ class FixLongDescriptions extends Command
*/ */
protected $signature = 'firefly-iii:fix-long-descriptions'; protected $signature = 'firefly-iii:fix-long-descriptions';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -51,7 +51,6 @@ class FixPiggies extends Command
/** @var int */ /** @var int */
private $count; private $count;
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -54,7 +54,6 @@ class FixRecurringTransactions extends Command
/** @var UserRepositoryInterface */ /** @var UserRepositoryInterface */
private $userRepos; private $userRepos;
/** /**
* Execute the console command. * Execute the console command.
* *
@ -65,8 +64,6 @@ class FixRecurringTransactions extends Command
$start = microtime(true); $start = microtime(true);
$this->stupidLaravel(); $this->stupidLaravel();
$this->correctTransactions(); $this->correctTransactions();
$end = round(microtime(true) - $start, 2); $end = round(microtime(true) - $start, 2);
$this->info(sprintf('Corrected recurring transactions in %s seconds.', $end)); $this->info(sprintf('Corrected recurring transactions in %s seconds.', $end));

View File

@ -50,7 +50,6 @@ class FixTransactionTypes extends Command
*/ */
protected $signature = 'firefly-iii:fix-transaction-types'; protected $signature = 'firefly-iii:fix-transaction-types';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -48,7 +48,6 @@ class FixUnevenAmount extends Command
*/ */
protected $signature = 'firefly-iii:fix-uneven-amount'; protected $signature = 'firefly-iii:fix-uneven-amount';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -45,7 +45,6 @@ class RemoveBills extends Command
*/ */
protected $signature = 'firefly-iii:remove-bills'; protected $signature = 'firefly-iii:remove-bills';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -46,7 +46,6 @@ class RenameMetaFields extends Command
private int $count; private int $count;
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -46,7 +46,6 @@ class TransferBudgets extends Command
*/ */
protected $signature = 'firefly-iii:fix-transfer-budgets'; protected $signature = 'firefly-iii:fix-transfer-budgets';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -28,7 +28,6 @@ use Illuminate\Console\Command;
use PDO; use PDO;
use PDOException; use PDOException;
/** /**
* Class CreateDatabase * Class CreateDatabase
*/ */
@ -47,7 +46,6 @@ class CreateDatabase extends Command
*/ */
protected $signature = 'firefly-iii:create-database'; protected $signature = 'firefly-iii:create-database';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -47,7 +47,7 @@ class CreateFirstUser extends Command
* *
* @var string * @var string
*/ */
protected $signature = 'firefly-iii:create-first-user {email}'; protected $signature = 'firefly-iii:create-first-user {email}';
private UserRepositoryInterface $repository; private UserRepositoryInterface $repository;
/** /**

View File

@ -78,7 +78,6 @@ class ExportData extends Command
private JournalRepositoryInterface $journalRepository; private JournalRepositoryInterface $journalRepository;
private User $user; private User $user;
/** /**
* Execute the console command. * Execute the console command.
* *
@ -115,8 +114,6 @@ class ExportData extends Command
$exporter->setStart($options['start']); $exporter->setStart($options['start']);
$exporter->setEnd($options['end']); $exporter->setEnd($options['end']);
$exporter->setAccounts($options['accounts']); $exporter->setAccounts($options['accounts']);
$exporter->setExportTransactions($options['export']['transactions']); $exporter->setExportTransactions($options['export']['transactions']);
$exporter->setExportAccounts($options['export']['accounts']); $exporter->setExportAccounts($options['export']['accounts']);
$exporter->setExportBudgets($options['export']['budgets']); $exporter->setExportBudgets($options['export']['budgets']);
@ -294,6 +291,4 @@ class ExportData extends Command
$this->info(sprintf('Wrote %s-export to file "%s".', $key, $file)); $this->info(sprintf('Wrote %s-export to file "%s".', $key, $file));
} }
} }
} }

View File

@ -48,7 +48,6 @@ class ReportEmptyObjects extends Command
*/ */
protected $signature = 'firefly-iii:report-empty-objects'; protected $signature = 'firefly-iii:report-empty-objects';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Integrity; namespace FireflyIII\Console\Commands\Integrity;
use Artisan; use Artisan;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Schema; use Schema;
@ -49,7 +48,6 @@ class ReportIntegrity extends Command
*/ */
protected $signature = 'firefly-iii:report-integrity'; protected $signature = 'firefly-iii:report-integrity';
/** /**
* Execute the console command. * Execute the console command.
*/ */

View File

@ -45,7 +45,6 @@ class ReportSum extends Command
*/ */
protected $signature = 'firefly-iii:report-sum'; protected $signature = 'firefly-iii:report-sum';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -58,7 +57,6 @@ class ReportSum extends Command
return 0; return 0;
} }
/** /**
* Reports for each user when the sum of their transactions is not zero. * Reports for each user when the sum of their transactions is not zero.
*/ */

View File

@ -46,7 +46,6 @@ class RestoreOAuthKeys extends Command
*/ */
protected $signature = 'firefly-iii:restore-oauth-keys'; protected $signature = 'firefly-iii:restore-oauth-keys';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -54,7 +54,6 @@ class ScanAttachments extends Command
*/ */
protected $signature = 'firefly-iii:scan-attachments'; protected $signature = 'firefly-iii:scan-attachments';
/** /**
* Execute the console command. * Execute the console command.
*/ */

View File

@ -44,7 +44,6 @@ class SetLatestVersion extends Command
*/ */
protected $signature = 'firefly-iii:set-latest-version {--james-is-cool}'; protected $signature = 'firefly-iii:set-latest-version {--james-is-cool}';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Tools; namespace FireflyIII\Console\Commands\Tools;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Console\Commands\VerifiesAccessToken; use FireflyIII\Console\Commands\VerifiesAccessToken;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
@ -78,7 +77,6 @@ class ApplyRules extends Command
private array $ruleSelection; private array $ruleSelection;
private Carbon $startDate; private Carbon $startDate;
/** /**
* Execute the console command. * Execute the console command.
* *
@ -227,8 +225,6 @@ class ApplyRules extends Command
/** @var AccountRepositoryInterface $accountRepository */ /** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class); $accountRepository = app(AccountRepositoryInterface::class);
$accountRepository->setUser($this->getUser()); $accountRepository->setUser($this->getUser());
foreach ($accountList as $accountId) { foreach ($accountList as $accountId) {
$accountId = (int)$accountId; $accountId = (int)$accountId;
$account = $accountRepository->findNull($accountId); $account = $accountRepository->findNull($accountId);

View File

@ -57,7 +57,6 @@ class Cron extends Command
{--date= : Set the date in YYYY-MM-DD to make Firefly III think that\'s the current date.} {--date= : Set the date in YYYY-MM-DD to make Firefly III think that\'s the current date.}
'; ';
/** /**
* @return int * @return int
*/ */

View File

@ -59,7 +59,6 @@ class AccountCurrencies extends Command
/** @var UserRepositoryInterface */ /** @var UserRepositoryInterface */
private $userRepos; private $userRepos;
/** /**
* Each (asset) account must have a reference to a preferred currency. If the account does not have one, it's forced upon the account. * Each (asset) account must have a reference to a preferred currency. If the account does not have one, it's forced upon the account.
* *
@ -88,7 +87,6 @@ class AccountCurrencies extends Command
$this->info(sprintf('Verified and fixed account currencies in %s seconds.', $end)); $this->info(sprintf('Verified and fixed account currencies in %s seconds.', $end));
$this->markAsExecuted(); $this->markAsExecuted();
return 0; return 0;
} }
@ -206,8 +204,6 @@ class AccountCurrencies extends Command
return; return;
} }
// do not match and opening balance id is not null. // do not match and opening balance id is not null.
if ($accountCurrency !== $obCurrency && null !== $openingBalance) { if ($accountCurrency !== $obCurrency && null !== $openingBalance) {
Log::debug(sprintf('Account (#%d) and OB currency (#%d) are different. Overrule OB, set to account currency.', $accountCurrency, $obCurrency)); Log::debug(sprintf('Account (#%d) and OB currency (#%d) are different. Overrule OB, set to account currency.', $accountCurrency, $obCurrency));

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* AppendBudgetLimitPeriods.php * AppendBudgetLimitPeriods.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* AppendBudgetLimitPeriods.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;

View File

@ -51,7 +51,6 @@ class BackToJournals extends Command
*/ */
protected $signature = 'firefly-iii:back-to-journals {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:back-to-journals {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Models\Budget; use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@ -47,7 +46,6 @@ class BudgetLimitCurrency extends Command
*/ */
protected $signature = 'firefly-iii:bl-currency {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:bl-currency {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -109,7 +107,6 @@ class BudgetLimitCurrency extends Command
return false; // @codeCoverageIgnore return false; // @codeCoverageIgnore
} }
/** /**
* *
*/ */

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@ -34,8 +33,6 @@ use Illuminate\Support\Collection;
*/ */
class CCLiabilities extends Command class CCLiabilities extends Command
{ {
public const CONFIG_NAME = '480_cc_liabilities'; public const CONFIG_NAME = '480_cc_liabilities';
/** /**
* The console command description. * The console command description.
@ -50,7 +47,6 @@ class CCLiabilities extends Command
*/ */
protected $signature = 'firefly-iii:cc-liabilities {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:cc-liabilities {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -108,7 +104,6 @@ class CCLiabilities extends Command
return false; // @codeCoverageIgnore return false; // @codeCoverageIgnore
} }
/** /**
* *
*/ */

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Models\Attachment; use FireflyIII\Models\Attachment;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@ -48,7 +47,6 @@ class MigrateAttachments extends Command
*/ */
protected $signature = 'firefly-iii:migrate-attachments {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:migrate-attachments {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -118,7 +116,6 @@ class MigrateAttachments extends Command
return false; // @codeCoverageIgnore return false; // @codeCoverageIgnore
} }
/** /**
* *
*/ */

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use Exception; use Exception;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournalMeta; use FireflyIII\Models\TransactionJournalMeta;
@ -49,7 +48,6 @@ class MigrateJournalNotes extends Command
*/ */
protected $signature = 'firefly-iii:migrate-notes {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:migrate-notes {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -117,7 +115,6 @@ class MigrateJournalNotes extends Command
return false; // @codeCoverageIgnore return false; // @codeCoverageIgnore
} }
/** /**
* *
*/ */

View File

@ -47,7 +47,6 @@ class MigrateRecurrenceMeta extends Command
*/ */
protected $signature = 'firefly-iii:migrate-recurrence-meta {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:migrate-recurrence-meta {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -1,5 +1,27 @@
<?php <?php
/*
* MigrateRecurrenceType.php
* Copyright (c) 2021 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Models\Recurrence; use FireflyIII\Models\Recurrence;

View File

@ -48,7 +48,6 @@ class MigrateTagLocations extends Command
*/ */
protected $signature = 'firefly-iii:migrate-tag-locations {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:migrate-tag-locations {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -130,6 +129,4 @@ class MigrateTagLocations extends Command
{ {
app('fireflyconfig')->set(self::CONFIG_NAME, true); app('fireflyconfig')->set(self::CONFIG_NAME, true);
} }
} }

View File

@ -104,8 +104,6 @@ class MigrateToGroups extends Command
if (0 === $this->count) { if (0 === $this->count) {
$this->line('No journals to migrate to groups.'); $this->line('No journals to migrate to groups.');
} }
$this->markAsMigrated(); $this->markAsMigrated();
return 0; return 0;

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Bill; use FireflyIII\Models\Bill;
use FireflyIII\Models\Preference; use FireflyIII\Models\Preference;
@ -63,7 +62,6 @@ class MigrateToRules extends Command
/** @var UserRepositoryInterface */ /** @var UserRepositoryInterface */
private $userRepository; private $userRepository;
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -66,7 +66,6 @@ class OtherCurrenciesCorrections extends Command
/** @var JournalRepositoryInterface */ /** @var JournalRepositoryInterface */
private $journalRepos; private $journalRepos;
/** /**
* Execute the console command. * Execute the console command.
* *

View File

@ -45,7 +45,6 @@ class RenameAccountMeta extends Command
*/ */
protected $signature = 'firefly-iii:rename-account-meta {--F|force : Force the execution of this command.}'; protected $signature = 'firefly-iii:rename-account-meta {--F|force : Force the execution of this command.}';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -108,7 +107,6 @@ class RenameAccountMeta extends Command
return false; // @codeCoverageIgnore return false; // @codeCoverageIgnore
} }
/** /**
* *
*/ */

View File

@ -57,7 +57,6 @@ class TransactionIdentifier extends Command
/** @var JournalRepositoryInterface */ /** @var JournalRepositoryInterface */
private $journalRepository; private $journalRepository;
/** /**
* This method gives all transactions which are part of a split journal (so more than 2) a sort of "order" so they are easier * This method gives all transactions which are part of a split journal (so more than 2) a sort of "order" so they are easier
* to easier to match to their counterpart. When a journal is split, it has two or three transactions: -3, -4 and -5 for example. * to easier to match to their counterpart. When a journal is split, it has two or three transactions: -3, -4 and -5 for example.

View File

@ -70,8 +70,6 @@ class TransferCurrenciesCorrections extends Command
*/ */
public function handle(): int public function handle(): int
{ {
$this->stupidLaravel(); $this->stupidLaravel();
$start = microtime(true); $start = microtime(true);
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
@ -188,8 +186,6 @@ class TransferCurrenciesCorrections extends Command
return; return;
} }
// @codeCoverageIgnoreEnd // @codeCoverageIgnoreEnd
// both accounts must have currency preference: // both accounts must have currency preference:
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
if ($this->isNoCurrencyPresent()) { if ($this->isNoCurrencyPresent()) {

View File

@ -48,7 +48,6 @@ class UpgradeDatabase extends Command
*/ */
protected $signature = 'firefly-iii:upgrade-database {--F|force : Force all upgrades.}'; protected $signature = 'firefly-iii:upgrade-database {--F|force : Force all upgrades.}';
/** /**
* Execute the console command. * Execute the console command.
* *
@ -58,8 +57,6 @@ class UpgradeDatabase extends Command
{ {
$this->callInitialCommands(); $this->callInitialCommands();
$commands = [ $commands = [
// there are 14 upgrade commands. // there are 14 upgrade commands.
'firefly-iii:transaction-identifiers', 'firefly-iii:transaction-identifiers',

View File

@ -50,7 +50,6 @@ class UpgradeFireflyInstructions extends Command
*/ */
protected $signature = 'firefly:instructions {task}'; protected $signature = 'firefly:instructions {task}';
/** /**
* Execute the console command. * Execute the console command.
*/ */
@ -168,8 +167,6 @@ class UpgradeFireflyInstructions extends Command
$text = $config[$compare]; $text = $config[$compare];
} }
} }
$this->showLine(); $this->showLine();
$this->boxed(''); $this->boxed('');
if (null === $text) { if (null === $text) {

View File

@ -41,8 +41,6 @@ class AdminRequestedTestMessage extends Event
public $ipAddress; public $ipAddress;
/** @var User The user */ /** @var User The user */
public $user; public $user;
/** /**
* Create a new event instance. * Create a new event instance.
* *

View File

@ -37,8 +37,6 @@ class DestroyedTransactionGroup extends Event
use SerializesModels; use SerializesModels;
public TransactionGroup $transactionGroup; public TransactionGroup $transactionGroup;
/** /**
* Create a new event instance. * Create a new event instance.
* *

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Events; namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournalLink; use FireflyIII\Models\TransactionJournalLink;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* DetectedNewIPAddress.php * DetectedNewIPAddress.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,29 +20,8 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* DetectedNewIPAddress.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Events; namespace FireflyIII\Events;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;

View File

@ -40,8 +40,6 @@ class RegisteredUser extends Event
public $ipAddress; public $ipAddress;
/** @var User The user */ /** @var User The user */
public $user; public $user;
/** /**
* Create a new event instance. This event is triggered when a new user registers. * Create a new event instance. This event is triggered when a new user registers.
* *

View File

@ -42,8 +42,6 @@ class RequestedNewPassword extends Event
public $token; public $token;
/** @var User The user */ /** @var User The user */
public $user; public $user;
/** /**
* Create a new event instance. This event is triggered when a users tries to reset his or her password. * Create a new event instance. This event is triggered when a users tries to reset his or her password.
* *

View File

@ -45,8 +45,6 @@ class RequestedReportOnJournals
public $groups; public $groups;
/** @var int The ID of the user. */ /** @var int The ID of the user. */
public $userId; public $userId;
/** /**
* Create a new event instance. * Create a new event instance.
* *

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* RequestedSendWebhookMessages.php * RequestedSendWebhookMessages.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,31 +20,10 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* RequestedSendWebhookMessages.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Events; namespace FireflyIII\Events;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
class RequestedSendWebhookMessages extends Event class RequestedSendWebhookMessages extends Event
{ {
use SerializesModels; use SerializesModels;

View File

@ -26,8 +26,6 @@ namespace FireflyIII\Events;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
/** /**
* Class RequestedVersionCheckStatus * Class RequestedVersionCheckStatus
* *
@ -39,8 +37,6 @@ class RequestedVersionCheckStatus extends Event
/** @var User The user */ /** @var User The user */
public $user; public $user;
/** /**
* Create a new event instance. This event is triggered when Firefly III wants to know * Create a new event instance. This event is triggered when Firefly III wants to know
* what the deal is with the version checker. * what the deal is with the version checker.

View File

@ -38,8 +38,6 @@ class StoredTransactionGroup extends Event
public bool $applyRules; public bool $applyRules;
public TransactionGroup $transactionGroup; public TransactionGroup $transactionGroup;
/** /**
* Create a new event instance. * Create a new event instance.
* *

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Events; namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournalLink; use FireflyIII\Models\TransactionJournalLink;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;

View File

@ -40,8 +40,6 @@ class UpdatedTransactionGroup extends Event
public $applyRules; public $applyRules;
/** @var TransactionGroup The group that was stored. */ /** @var TransactionGroup The group that was stored. */
public $transactionGroup; public $transactionGroup;
/** /**
* Create a new event instance. * Create a new event instance.
* *

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Events; namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournalLink; use FireflyIII\Models\TransactionJournalLink;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;

View File

@ -44,8 +44,6 @@ class UserChangedEmail extends Event
public $oldEmail; public $oldEmail;
/** @var User The user itself */ /** @var User The user itself */
public $user; public $user;
/** /**
* UserChangedEmail constructor. * UserChangedEmail constructor.
* *

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Exceptions; namespace FireflyIII\Exceptions;
use Exception; use Exception;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\Attachment; use FireflyIII\Models\Attachment;

View File

@ -98,8 +98,6 @@ class Handler extends ExceptionHandler
return $handler->render($request, $exception); return $handler->render($request, $exception);
} }
if ($exception instanceof FireflyException || $exception instanceof ErrorException || $exception instanceof OAuthServerException) { if ($exception instanceof FireflyException || $exception instanceof ErrorException || $exception instanceof OAuthServerException) {
$isDebug = config('app.debug'); $isDebug = config('app.debug');

View File

@ -207,8 +207,6 @@ class AccountFactory
if (null !== $result) { if (null !== $result) {
Log::debug(sprintf('Found account type based on %d and "%s": "%s"', $accountTypeId, $accountType, $result->type)); Log::debug(sprintf('Found account type based on %d and "%s": "%s"', $accountTypeId, $accountType, $result->type));
} }
return $result; return $result;
} }
@ -233,6 +231,4 @@ class AccountFactory
{ {
$this->user = $user; $this->user = $user;
} }
} }

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Factory; namespace FireflyIII\Factory;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Category; use FireflyIII\Models\Category;
use FireflyIII\User; use FireflyIII\User;

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Factory; namespace FireflyIII\Factory;
use FireflyIII\Models\PiggyBank; use FireflyIII\Models\PiggyBank;
use FireflyIII\User; use FireflyIII\User;

View File

@ -23,8 +23,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Factory; namespace FireflyIII\Factory;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Recurrence; use FireflyIII\Models\Recurrence;
@ -44,8 +42,6 @@ class RecurrenceFactory
private MessageBag $errors; private MessageBag $errors;
private User $user; private User $user;
/** /**
* Constructor. * Constructor.
* *

View File

@ -102,6 +102,4 @@ class TransactionCurrencyFactory
return null; return null;
} }
} }

View File

@ -44,8 +44,6 @@ class TransactionFactory
private TransactionJournal $journal; private TransactionJournal $journal;
private bool $reconciled; private bool $reconciled;
private User $user; private User $user;
/** /**
* Constructor. * Constructor.
* *

View File

@ -40,8 +40,6 @@ class TransactionGroupFactory
private $journalFactory; private $journalFactory;
/** @var User The user */ /** @var User The user */
private $user; private $user;
/** /**
* TransactionGroupFactory constructor. * TransactionGroupFactory constructor.
*/ */

View File

@ -263,8 +263,6 @@ class TransactionJournalFactory
$this->forceDeleteOnError(new Collection([$journal])); $this->forceDeleteOnError(new Collection([$journal]));
throw new FireflyException($e->getMessage()); throw new FireflyException($e->getMessage());
} }
// verify that journal has two transactions. Otherwise, delete and cancel. // verify that journal has two transactions. Otherwise, delete and cancel.
$journal->completed = true; $journal->completed = true;
$journal->save(); $journal->save();
@ -578,6 +576,4 @@ class TransactionJournalFactory
$this->piggyRepository->setUser($this->user); $this->piggyRepository->setUser($this->user);
$this->accountRepository->setUser($this->user); $this->accountRepository->setUser($this->user);
} }
} }

View File

@ -65,8 +65,6 @@ class YearReportGenerator implements ReportGeneratorInterface
return $result; return $result;
} }
/** /**
* Set the accounts. * Set the accounts.
* *

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* MessageGeneratorInterface.php * MessageGeneratorInterface.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* MessageGeneratorInterface.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Generator\Webhook; namespace FireflyIII\Generator\Webhook;

View File

@ -1,25 +1,5 @@
<?php <?php
/*
* StandardMessageGenerator.php
* Copyright (c) 2021 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1); declare(strict_types=1);
/* /*
* WebhookMessageGenerator.php * WebhookMessageGenerator.php

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Handlers\Events; namespace FireflyIII\Handlers\Events;
use Exception; use Exception;
use FireflyIII\Mail\AccessTokenCreatedMail; use FireflyIII\Mail\AccessTokenCreatedMail;
use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface;
@ -82,8 +80,6 @@ class APIEventHandler
} }
return true; return true;
} }
} }

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* DestroyedGroupEventHandler.php * DestroyedGroupEventHandler.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,29 +20,8 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* DestroyedGroupEventHandler.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Handlers\Events; namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\DestroyedTransactionGroup; use FireflyIII\Events\DestroyedTransactionGroup;
use FireflyIII\Events\RequestedSendWebhookMessages; use FireflyIII\Events\RequestedSendWebhookMessages;
use FireflyIII\Generator\Webhook\MessageGeneratorInterface; use FireflyIII\Generator\Webhook\MessageGeneratorInterface;

View File

@ -318,8 +318,6 @@ class UserEventHandler
'time' => now(config('app.timezone'))->format('Y-m-d H:i:s'), 'time' => now(config('app.timezone'))->format('Y-m-d H:i:s'),
'notified' => false, 'notified' => false,
]; ];
} }
$preference = array_values($preference); $preference = array_values($preference);
app('preferences')->setForUser($user, 'login_ip_history', $preference); app('preferences')->setForUser($user, 'login_ip_history', $preference);

View File

@ -23,16 +23,12 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Handlers\Events; namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\RequestedVersionCheckStatus; use FireflyIII\Events\RequestedVersionCheckStatus;
use FireflyIII\Helpers\Update\UpdateTrait; use FireflyIII\Helpers\Update\UpdateTrait;
use FireflyIII\Models\Configuration; use FireflyIII\Models\Configuration;
use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Log; use Log;
/** /**
* Class VersionCheckEventHandler * Class VersionCheckEventHandler
*/ */

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* WebhookEventHandler.php * WebhookEventHandler.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,29 +20,8 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* WebhookEventHandler.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Handlers\Events; namespace FireflyIII\Handlers\Events;
use FireflyIII\Jobs\SendWebhookMessage; use FireflyIII\Jobs\SendWebhookMessage;
use FireflyIII\Models\WebhookMessage; use FireflyIII\Models\WebhookMessage;
use Log; use Log;

View File

@ -55,8 +55,6 @@ class AttachmentHelper implements AttachmentHelperInterface
/** @var Filesystem The disk where attachments are stored. */ /** @var Filesystem The disk where attachments are stored. */
protected $uploadDisk; protected $uploadDisk;
/** /**
* AttachmentHelper constructor. * AttachmentHelper constructor.
* *
@ -71,8 +69,6 @@ class AttachmentHelper implements AttachmentHelperInterface
$this->attachments = new Collection; $this->attachments = new Collection;
$this->uploadDisk = Storage::disk('upload'); $this->uploadDisk = Storage::disk('upload');
} }
/** /**
* Returns the content of an attachment. * Returns the content of an attachment.
* *

View File

@ -52,8 +52,6 @@ trait AccountCollection
return $this; return $this;
} }
/** /**
* These accounts must not be source accounts. * These accounts must not be source accounts.
* *
@ -72,8 +70,6 @@ trait AccountCollection
return $this; return $this;
} }
/** /**
* Define which accounts can be part of the source and destination transactions. * Define which accounts can be part of the source and destination transactions.
* *
@ -119,8 +115,6 @@ trait AccountCollection
return $this; return $this;
} }
/** /**
* Define which accounts can be part of the source and destination transactions. * Define which accounts can be part of the source and destination transactions.
* *
@ -139,8 +133,6 @@ trait AccountCollection
return $this; return $this;
} }
/** /**
* Define which accounts can be part of the source and destination transactions. * Define which accounts can be part of the source and destination transactions.
* *
@ -159,8 +151,6 @@ trait AccountCollection
return $this; return $this;
} }
/** /**
* Either account can be set, but NOT both. This effectively excludes internal transfers. * Either account can be set, but NOT both. This effectively excludes internal transfers.
* *
@ -197,8 +187,6 @@ trait AccountCollection
return $this; return $this;
} }
/** /**
* Will include the source and destination account names and types. * Will include the source and destination account names and types.
* *
@ -225,8 +213,6 @@ trait AccountCollection
$this->fields[] = 'dest_account.name as destination_account_name'; $this->fields[] = 'dest_account.name as destination_account_name';
$this->fields[] = 'dest_account.iban as destination_account_iban'; $this->fields[] = 'dest_account.iban as destination_account_iban';
$this->fields[] = 'dest_account_type.type as destination_account_type'; $this->fields[] = 'dest_account_type.type as destination_account_type';
$this->hasAccountInfo = true; $this->hasAccountInfo = true;
} }

View File

@ -470,6 +470,4 @@ trait MetaCollection
$this->query->leftJoin('tags', 'tag_transaction_journal.tag_id', '=', 'tags.id'); $this->query->leftJoin('tags', 'tag_transaction_journal.tag_id', '=', 'tags.id');
} }
} }
} }

View File

@ -102,8 +102,6 @@ trait TimeCollection
return $this; return $this;
} }
/** /**
* Collect transactions updated on a specific date. * Collect transactions updated on a specific date.
* *

View File

@ -654,8 +654,6 @@ class GroupCollector implements GroupCollectorInterface
} }
// or parse the rest. // or parse the rest.
$journalId = (int)$augumentedJournal->transaction_journal_id; $journalId = (int)$augumentedJournal->transaction_journal_id;
if (array_key_exists($journalId, $groups[$groupId]['transactions'])) { if (array_key_exists($journalId, $groups[$groupId]['transactions'])) {
// append data to existing group + journal (for multiple tags or multiple attachments) // append data to existing group + journal (for multiple tags or multiple attachments)
$groups[$groupId]['transactions'][$journalId] = $this->mergeTags($groups[$groupId]['transactions'][$journalId], $augumentedJournal); $groups[$groupId]['transactions'][$journalId] = $this->mergeTags($groups[$groupId]['transactions'][$journalId], $augumentedJournal);

View File

@ -79,8 +79,6 @@ class PopupReport implements PopupReportInterface
$repos = app(CurrencyRepositoryInterface::class); $repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int)$currencyId); $currency = $repos->find((int)$currencyId);
} }
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);
$collector $collector
@ -116,8 +114,6 @@ class PopupReport implements PopupReportInterface
$repos = app(CurrencyRepositoryInterface::class); $repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int)$currencyId); $currency = $repos->find((int)$currencyId);
} }
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);
$collector->setAccounts($attributes['accounts']) $collector->setAccounts($attributes['accounts'])

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* Sha3SignatureGenerator.php * Sha3SignatureGenerator.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* Sha3SignatureGenerator.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Helpers\Webhook; namespace FireflyIII\Helpers\Webhook;

View File

@ -1,5 +1,4 @@
<?php <?php
/* /*
* SignatureGeneratorInterface.php * SignatureGeneratorInterface.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
/*
* SignatureGeneratorInterface.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Helpers\Webhook; namespace FireflyIII\Helpers\Webhook;

View File

@ -22,8 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Account; namespace FireflyIII\Http\Controllers\Account;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;

View File

@ -166,8 +166,6 @@ class EditController extends Controller
) )
); );
} }
/** /**
* Update the account. * Update the account.
* *

View File

@ -181,6 +181,4 @@ class IndexController extends Controller
return prefixView('accounts.index', compact('objectType', 'inactiveCount', 'subTitleIcon', 'subTitle', 'page', 'accounts')); return prefixView('accounts.index', compact('objectType', 'inactiveCount', 'subTitleIcon', 'subTitle', 'page', 'accounts'));
} }
} }

View File

@ -95,8 +95,6 @@ class ReconcileController extends Controller
if (!$this->isEditableAccount($account)) { if (!$this->isEditableAccount($account)) {
return $this->redirectAccountToAccount($account); // @codeCoverageIgnore return $this->redirectAccountToAccount($account); // @codeCoverageIgnore
} }
if (AccountType::ASSET !== $account->accountType->type) { if (AccountType::ASSET !== $account->accountType->type) {
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
session()->flash('error', (string) trans('firefly.must_be_asset_account')); session()->flash('error', (string) trans('firefly.must_be_asset_account'));

View File

@ -72,9 +72,6 @@ class ShowController extends Controller
} }
); );
} }
/** /**
* Show an account. * Show an account.
* *
@ -167,8 +164,6 @@ class ShowController extends Controller
if (!$this->isEditableAccount($account)) { if (!$this->isEditableAccount($account)) {
return $this->redirectAccountToAccount($account); // @codeCoverageIgnore return $this->redirectAccountToAccount($account); // @codeCoverageIgnore
} }
$location = $this->repository->getLocation($account); $location = $this->repository->getLocation($account);
$isLiability = $this->repository->isLiability($account); $isLiability = $this->repository->isLiability($account);
$attachments = $this->repository->getAttachments($account); $attachments = $this->repository->getAttachments($account);

View File

@ -171,8 +171,6 @@ class AttachmentController extends Controller
return $attachment; return $attachment;
} }
); );
return prefixView('attachments.index', compact('set')); return prefixView('attachments.index', compact('set'));
} }

View File

@ -67,8 +67,6 @@ class LoginController extends Controller
parent::__construct(); parent::__construct();
$this->middleware('guest')->except('logout'); $this->middleware('guest')->except('logout');
} }
/** /**
* Handle a login request to the application. * Handle a login request to the application.
* *
@ -216,8 +214,6 @@ class LoginController extends Controller
$cookieName = config('google2fa.cookie_name', 'google2fa_token'); $cookieName = config('google2fa.cookie_name', 'google2fa_token');
request()->cookies->set($cookieName, 'invalid'); request()->cookies->set($cookieName, 'invalid');
} }
return prefixView('auth.login', compact('allowRegistration', 'email', 'remember', 'allowReset', 'title')); return prefixView('auth.login', compact('allowRegistration', 'email', 'remember', 'allowReset', 'title'));
} }

View File

@ -23,8 +23,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Bill; namespace FireflyIII\Http\Controllers\Bill;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;

View File

@ -23,8 +23,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Bill; namespace FireflyIII\Http\Controllers\Bill;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Bill; use FireflyIII\Models\Bill;
use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface;

View File

@ -23,8 +23,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Bill; namespace FireflyIII\Http\Controllers\Bill;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\BillUpdateRequest; use FireflyIII\Http\Requests\BillUpdateRequest;
@ -64,8 +62,6 @@ class EditController extends Controller
} }
); );
} }
/** /**
* Edit a bill. * Edit a bill.
* *
@ -112,8 +108,6 @@ class EditController extends Controller
return prefixView('bills.edit', compact('subTitle', 'periods', 'rules', 'bill', 'defaultCurrency', 'preFilled')); return prefixView('bills.edit', compact('subTitle', 'periods', 'rules', 'bill', 'defaultCurrency', 'preFilled'));
} }
/** /**
* Update a bill. * Update a bill.
* *

View File

@ -23,8 +23,6 @@
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Bill; namespace FireflyIII\Http\Controllers\Bill;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Bill; use FireflyIII\Models\Bill;
@ -73,8 +71,6 @@ class IndexController extends Controller
{ {
$this->cleanupObjectGroups(); $this->cleanupObjectGroups();
$this->repository->correctOrder(); $this->repository->correctOrder();
$start = session('start'); $start = session('start');
$end = session('end'); $end = session('end');
$collection = $this->repository->getBills(); $collection = $this->repository->getBills();
@ -100,8 +96,6 @@ class IndexController extends Controller
'bills' => [], 'bills' => [],
], ],
]; ];
/** @var Bill $bill */ /** @var Bill $bill */
foreach ($collection as $bill) { foreach ($collection as $bill) {
$array = $transformer->transform($bill); $array = $transformer->transform($bill);
@ -145,8 +139,6 @@ class IndexController extends Controller
return prefixView('bills.index', compact('bills', 'sums', 'total', 'totals')); return prefixView('bills.index', compact('bills', 'sums', 'total', 'totals'));
} }
/** /**
* @param array $bills * @param array $bills
* *

Some files were not shown because too many files have changed in this diff Show More