mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 20:22:07 +00:00
Code cleanup
This commit is contained in:
@@ -236,7 +236,7 @@ class MigrateToGroups extends Command
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @throws Exception
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*
|
||||
*/
|
||||
private function makeMultiGroup(TransactionJournal $journal): void
|
||||
{
|
||||
|
@@ -248,8 +248,8 @@ class OtherCurrenciesCorrections extends Command
|
||||
* Gets the transaction that determines the transaction that "leads" and will determine
|
||||
* the currency to be used by all transactions, and the journal itself.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return Transaction|null
|
||||
*/
|
||||
private function getLeadTransaction(TransactionJournal $journal): ?Transaction
|
||||
|
@@ -291,8 +291,6 @@ class TransferCurrenciesCorrections extends Command
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*
|
||||
* @param TransactionJournal $transfer
|
||||
*/
|
||||
private function updateTransferCurrency(TransactionJournal $transfer): void
|
||||
|
@@ -36,16 +36,15 @@ class StoredTransactionGroup extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $applyRules;
|
||||
/** @var TransactionGroup The group that was stored. */
|
||||
public $transactionGroup;
|
||||
|
||||
public $applyRules;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param TransactionGroup $transactionGroup
|
||||
* @param bool $applyRules
|
||||
* @param bool $applyRules
|
||||
*/
|
||||
public function __construct(TransactionGroup $transactionGroup, bool $applyRules = true)
|
||||
{
|
||||
|
@@ -29,6 +29,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class UpdatedTransactionGroup.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
*/
|
||||
|
@@ -43,9 +43,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Exception $exception
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.NPathComplexity)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@@ -48,9 +48,7 @@ class Handler extends ExceptionHandler
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Exception $exception
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.NPathComplexity)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
@@ -112,7 +110,7 @@ class Handler extends ExceptionHandler
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry etc.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five its fine.
|
||||
* // it's five its fine.
|
||||
*
|
||||
* @param Exception $exception
|
||||
*
|
||||
|
@@ -189,7 +189,7 @@ class AccountFactory
|
||||
* @param null|string $accountType
|
||||
*
|
||||
* @return AccountType|null
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
protected function getAccountType(?int $accountTypeId, ?string $accountType): ?AccountType
|
||||
{
|
||||
|
@@ -26,7 +26,6 @@ namespace FireflyIII\Factory;
|
||||
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
@@ -53,7 +52,7 @@ class BudgetFactory
|
||||
* @param null|string $budgetName
|
||||
*
|
||||
* @return Budget|null
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
public function find(?int $budgetId, ?string $budgetName): ?Budget
|
||||
{
|
||||
|
@@ -26,7 +26,6 @@ namespace FireflyIII\Factory;
|
||||
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
@@ -63,7 +62,7 @@ class CategoryFactory
|
||||
* @param null|string $categoryName
|
||||
*
|
||||
* @return Category|null
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
public function findOrCreate(?int $categoryId, ?string $categoryName): ?Category
|
||||
{
|
||||
|
@@ -53,7 +53,7 @@ class PiggyBankEventFactory
|
||||
* @param PiggyBank|null $piggyBank
|
||||
*
|
||||
* @return PiggyBankEvent|null
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
public function create(TransactionJournal $journal, ?PiggyBank $piggyBank): ?PiggyBankEvent
|
||||
{
|
||||
|
@@ -52,7 +52,7 @@ class PiggyBankFactory
|
||||
* @param null|string $piggyBankName
|
||||
*
|
||||
* @return PiggyBank|null
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
public function find(?int $piggyBankId, ?string $piggyBankName): ?PiggyBank
|
||||
{
|
||||
|
@@ -79,7 +79,7 @@ class TransactionCurrencyFactory
|
||||
* @param null|string $currencyCode
|
||||
*
|
||||
* @return TransactionCurrency|null
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
public function find(?int $currencyId, ?string $currencyCode): ?TransactionCurrency
|
||||
{
|
||||
|
@@ -49,8 +49,6 @@ class TransactionJournalMetaFactory
|
||||
* @param array $data
|
||||
*
|
||||
* @return TransactionJournalMeta|null
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*/
|
||||
public function updateOrCreate(array $data): ?TransactionJournalMeta
|
||||
{
|
||||
|
@@ -109,7 +109,7 @@ class ChartJsGenerator implements GeneratorInterface
|
||||
* ]
|
||||
* ]
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five.
|
||||
* // it's five.
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
|
@@ -60,7 +60,7 @@ interface GeneratorInterface
|
||||
* ]
|
||||
* ]
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five.
|
||||
* // it's five.
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
|
@@ -112,7 +112,7 @@ class Support
|
||||
/**
|
||||
* Summarize collection by earned and spent data.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly five.
|
||||
* // it's exactly five.
|
||||
*
|
||||
* @param array $spent
|
||||
* @param array $earned
|
||||
|
@@ -43,9 +43,7 @@ class VersionCheckEventHandler
|
||||
/**
|
||||
* Checks with GitHub to see if there is a new version.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.NPathComplexity)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
*
|
||||
* @param RequestedVersionCheckStatus $event
|
||||
*/
|
||||
public function checkForUpdates(RequestedVersionCheckStatus $event): void
|
||||
|
@@ -98,7 +98,7 @@ class MetaPieChart implements MetaPieChartInterface
|
||||
* @param string $group
|
||||
*
|
||||
* @return array
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
public function generate(string $direction, string $group): array
|
||||
{
|
||||
@@ -181,8 +181,6 @@ class MetaPieChart implements MetaPieChartInterface
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*
|
||||
*/
|
||||
protected function groupByFields(array $array, array $fields): array
|
||||
{
|
||||
|
@@ -43,8 +43,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
|
||||
/**
|
||||
* ReportHelper constructor.
|
||||
*
|
||||
*
|
||||
* @param BudgetRepositoryInterface $budgetRepository
|
||||
*/
|
||||
public function __construct(BudgetRepositoryInterface $budgetRepository)
|
||||
|
@@ -43,8 +43,6 @@ class ReportHelper implements ReportHelperInterface
|
||||
|
||||
/**
|
||||
* ReportHelper constructor.
|
||||
*
|
||||
*
|
||||
* @param BudgetRepositoryInterface $budgetRepository
|
||||
*/
|
||||
public function __construct(BudgetRepositoryInterface $budgetRepository)
|
||||
|
Reference in New Issue
Block a user