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;
use Artisan;
use Illuminate\Console\Command;
use Schema;
@ -48,7 +47,6 @@ class CorrectDatabase extends Command
*/
protected $signature = 'firefly-iii:correct-database';
/**
* Execute the console command.
*/

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -54,7 +54,6 @@ class FixRecurringTransactions extends Command
/** @var UserRepositoryInterface */
private $userRepos;
/**
* Execute the console command.
*
@ -65,8 +64,6 @@ class FixRecurringTransactions extends Command
$start = microtime(true);
$this->stupidLaravel();
$this->correctTransactions();
$end = round(microtime(true) - $start, 2);
$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';
/**
* Execute the console command.
*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -78,7 +78,6 @@ class ExportData extends Command
private JournalRepositoryInterface $journalRepository;
private User $user;
/**
* Execute the console command.
*
@ -115,8 +114,6 @@ class ExportData extends Command
$exporter->setStart($options['start']);
$exporter->setEnd($options['end']);
$exporter->setAccounts($options['accounts']);
$exporter->setExportTransactions($options['export']['transactions']);
$exporter->setExportAccounts($options['export']['accounts']);
$exporter->setExportBudgets($options['export']['budgets']);
@ -294,6 +291,4 @@ class ExportData extends Command
$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';
/**
* Execute the console command.
*

View File

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

View File

@ -45,7 +45,6 @@ class ReportSum extends Command
*/
protected $signature = 'firefly-iii:report-sum';
/**
* Execute the console command.
*
@ -58,7 +57,6 @@ class ReportSum extends Command
return 0;
}
/**
* 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';
/**
* Execute the console command.
*

View File

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

View File

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

View File

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

View File

@ -59,7 +59,6 @@ class AccountCurrencies extends Command
/** @var UserRepositoryInterface */
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.
*
@ -88,7 +87,6 @@ class AccountCurrencies extends Command
$this->info(sprintf('Verified and fixed account currencies in %s seconds.', $end));
$this->markAsExecuted();
return 0;
}
@ -206,8 +204,6 @@ class AccountCurrencies extends Command
return;
}
// do not match and opening balance id is not null.
if ($accountCurrency !== $obCurrency && null !== $openingBalance) {
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
/*
* AppendBudgetLimitPeriods.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/
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;

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.}';
/**
* Execute the console command.
*

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
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.}';
/**
* Execute the console command.
*
@ -109,7 +107,6 @@ class BudgetLimitCurrency extends Command
return false; // @codeCoverageIgnore
}
/**
*
*/

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use Illuminate\Console\Command;
@ -34,8 +33,6 @@ use Illuminate\Support\Collection;
*/
class CCLiabilities extends Command
{
public const CONFIG_NAME = '480_cc_liabilities';
/**
* 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.}';
/**
* Execute the console command.
*
@ -108,7 +104,6 @@ class CCLiabilities extends Command
return false; // @codeCoverageIgnore
}
/**
*
*/

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Models\Attachment;
use FireflyIII\Models\Note;
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.}';
/**
* Execute the console command.
*
@ -118,7 +116,6 @@ class MigrateAttachments extends Command
return false; // @codeCoverageIgnore
}
/**
*
*/

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade;
use Exception;
use FireflyIII\Models\Note;
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.}';
/**
* Execute the console command.
*
@ -117,7 +115,6 @@ class MigrateJournalNotes extends Command
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.}';
/**
* Execute the console command.
*

View File

@ -1,5 +1,27 @@
<?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;
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.}';
/**
* Execute the console command.
*
@ -130,6 +129,4 @@ class MigrateTagLocations extends Command
{
app('fireflyconfig')->set(self::CONFIG_NAME, true);
}
}

View File

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

View File

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

View File

@ -66,7 +66,6 @@ class OtherCurrenciesCorrections extends Command
/** @var JournalRepositoryInterface */
private $journalRepos;
/**
* 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.}';
/**
* Execute the console command.
*
@ -108,7 +107,6 @@ class RenameAccountMeta extends Command
return false; // @codeCoverageIgnore
}
/**
*
*/

View File

@ -57,7 +57,6 @@ class TransactionIdentifier extends Command
/** @var JournalRepositoryInterface */
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
* 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
{
$this->stupidLaravel();
$start = microtime(true);
// @codeCoverageIgnoreStart
@ -188,8 +186,6 @@ class TransferCurrenciesCorrections extends Command
return;
}
// @codeCoverageIgnoreEnd
// both accounts must have currency preference:
// @codeCoverageIgnoreStart
if ($this->isNoCurrencyPresent()) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
<?php
/*
* DetectedNewIPAddress.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,29 +20,8 @@
*/
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;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;

View File

@ -40,8 +40,6 @@ class RegisteredUser extends Event
public $ipAddress;
/** @var User The user */
public $user;
/**
* 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;
/** @var User The user */
public $user;
/**
* 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;
/** @var int The ID of the user. */
public $userId;
/**
* Create a new event instance.
*

View File

@ -1,5 +1,4 @@
<?php
/*
* RequestedSendWebhookMessages.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,31 +20,10 @@
*/
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;
use Illuminate\Queue\SerializesModels;
class RequestedSendWebhookMessages extends Event
{
use SerializesModels;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
<?php
/*
* MessageGeneratorInterface.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/
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;

View File

@ -1,25 +1,5 @@
<?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);
/*
* WebhookMessageGenerator.php

View File

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

View File

@ -1,5 +1,4 @@
<?php
/*
* DestroyedGroupEventHandler.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,29 +20,8 @@
*/
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;
use FireflyIII\Events\DestroyedTransactionGroup;
use FireflyIII\Events\RequestedSendWebhookMessages;
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'),
'notified' => false,
];
}
$preference = array_values($preference);
app('preferences')->setForUser($user, 'login_ip_history', $preference);

View File

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

View File

@ -1,5 +1,4 @@
<?php
/*
* WebhookEventHandler.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,29 +20,8 @@
*/
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;
use FireflyIII\Jobs\SendWebhookMessage;
use FireflyIII\Models\WebhookMessage;
use Log;

View File

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

View File

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

View File

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

View File

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

View File

@ -654,8 +654,6 @@ class GroupCollector implements GroupCollectorInterface
}
// or parse the rest.
$journalId = (int)$augumentedJournal->transaction_journal_id;
if (array_key_exists($journalId, $groups[$groupId]['transactions'])) {
// append data to existing group + journal (for multiple tags or multiple attachments)
$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);
$currency = $repos->find((int)$currencyId);
}
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector
@ -116,8 +114,6 @@ class PopupReport implements PopupReportInterface
$repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int)$currencyId);
}
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector->setAccounts($attributes['accounts'])

View File

@ -1,5 +1,4 @@
<?php
/*
* Sha3SignatureGenerator.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/
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;

View File

@ -1,5 +1,4 @@
<?php
/*
* SignatureGeneratorInterface.php
* Copyright (c) 2021 james@firefly-iii.org
@ -21,25 +20,6 @@
*/
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;

View File

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

View File

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

View File

@ -181,6 +181,4 @@ class IndexController extends Controller
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)) {
return $this->redirectAccountToAccount($account); // @codeCoverageIgnore
}
if (AccountType::ASSET !== $account->accountType->type) {
// @codeCoverageIgnoreStart
session()->flash('error', (string) trans('firefly.must_be_asset_account'));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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