From e358f195489c7b54af1b6acda201041e6337222a Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:16:12 +0200 Subject: [PATCH 01/65] Make method static --- app/Support/Twig/AmountFormat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.php index ad712e781f..1a1a6a2abf 100644 --- a/app/Support/Twig/AmountFormat.php +++ b/app/Support/Twig/AmountFormat.php @@ -123,7 +123,7 @@ class AmountFormat extends Twig_Extension return new Twig_SimpleFunction( 'formatAmountBySymbol', /** @noinspection MoreThanThreeArgumentsInspection */ - function (string $amount, string $symbol, int $decimalPlaces = null, bool $coloured = null): string { + static function (string $amount, string $symbol, int $decimalPlaces = null, bool $coloured = null): string { $decimalPlaces = $decimalPlaces ?? 2; $coloured = $coloured ?? true; $currency = new TransactionCurrency; From 1090ce65977c75b9c583553154ea1715e31125e1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:16:28 +0200 Subject: [PATCH 02/65] Remove sum, make multi-currency --- resources/views/v1/reports/partials/categories.twig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/views/v1/reports/partials/categories.twig b/resources/views/v1/reports/partials/categories.twig index 8b6954fd83..6bf627789b 100644 --- a/resources/views/v1/reports/partials/categories.twig +++ b/resources/views/v1/reports/partials/categories.twig @@ -8,6 +8,7 @@ + {% set sumSpent = 0 %} {% set sumEarned = 0 %} {% for index, category in report %} @@ -21,8 +22,8 @@ {{ category.name }} - {{ category.earned|formatAmount }} - {{ category.spent|formatAmount }} + {{ formatAmountBySymbol(category.spent, category.currency_symbol, category.currency_decimal_places, true) }} + {{ formatAmountBySymbol(category.earned, category.currency_symbol, category.currency_decimal_places, true) }} {% endif %} - + {# {{ 'sum'|_ }} {{ sumEarned|formatAmount }} {{ sumSpent|formatAmount }}   + TODO fix the sum here. + #} From e67812bf646da105b74847f5aa8f5a99a759e795 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:17:15 +0200 Subject: [PATCH 03/65] Method is no longer used. --- .../Http/Controllers/ChartGeneration.php | 95 ------------------- 1 file changed, 95 deletions(-) diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php index 516f7a330d..fd31d54706 100644 --- a/app/Support/Http/Controllers/ChartGeneration.php +++ b/app/Support/Http/Controllers/ChartGeneration.php @@ -26,11 +26,8 @@ namespace FireflyIII\Support\Http\Controllers; use Carbon\Carbon; use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Models\Account; -use FireflyIII\Models\AccountType; -use FireflyIII\Models\Category; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountTaskerInterface; -use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; @@ -169,96 +166,4 @@ trait ChartGeneration return $result; } - - /** - * Chart for a specific period (start and end). - * - * - * @param Category $category - * @param Carbon $start - * @param Carbon $end - * - * @return array - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function makePeriodChart(Category $category, Carbon $start, Carbon $end): array // chart helper method. - { - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty($category->id); - $cache->addProperty('chart.category.period-chart'); - - - if ($cache->has()) { - return $cache->get(); // @codeCoverageIgnore - } - - /** @var AccountRepositoryInterface $accountRepository */ - $accountRepository = app(AccountRepositoryInterface::class); - $accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); - $repository = app(CategoryRepositoryInterface::class); - /** @var GeneratorInterface $generator */ - $generator = app(GeneratorInterface::class); - - // chart data - $chartData = [ - [ - 'label' => (string)trans('firefly.spent'), - 'entries' => [], - 'type' => 'bar', - 'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red - ], - [ - 'label' => (string)trans('firefly.earned'), - 'entries' => [], - 'type' => 'bar', - 'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green - ], - [ - 'label' => (string)trans('firefly.sum'), - 'entries' => [], - 'type' => 'line', - 'fill' => false, - ], - ]; - - $step = $this->calculateStep($start, $end); - - - while ($start <= $end) { - $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $start); - $earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $start, $start); - $sum = bcadd($spent, $earned); - $label = trim(app('navigation')->periodShow($start, $step)); - $chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 12); - $chartData[1]['entries'][$label] = round($earned, 12); - $chartData[2]['entries'][$label] = round($sum, 12); - - // @codeCoverageIgnoreStart - switch ($step) { - default: - case '1D': - $start->addDay(); - break; - case '1W': - $start->addDays(7); - break; - case '1M': - $start->addMonth(); - break; - case '1Y': - $start->addYear(); - break; - } - // @codeCoverageIgnoreEnd - } - - $data = $generator->multiSet($chartData); - $cache->store($data); - - return $data; - } - } From 33e241d39ac39e1224c7ca5d81cb63037193759b Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:17:43 +0200 Subject: [PATCH 04/65] Remove initial balance accounts from auto-complete. --- app/Http/Controllers/Json/AutoCompleteController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/Json/AutoCompleteController.php b/app/Http/Controllers/Json/AutoCompleteController.php index 26ee4b2b68..4a912f1443 100644 --- a/app/Http/Controllers/Json/AutoCompleteController.php +++ b/app/Http/Controllers/Json/AutoCompleteController.php @@ -68,6 +68,9 @@ class AutoCompleteController extends Controller $filteredAccountTypes[] = $type; } } + if (0 === count($filteredAccountTypes)) { + $filteredAccountTypes = $allowedAccountTypes; + } Log::debug(sprintf('Now in accounts("%s"). Filtering results.', $search), $filteredAccountTypes); $return = []; From bc68c367c84f4dd2658c3bb4d698ec162ef81e7c Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:18:26 +0200 Subject: [PATCH 05/65] Refactor earnedInperiod and spentInPeriod --- .../Category/CategoryRepository.php | 114 ++++++++++++++++-- .../Category/CategoryRepositoryInterface.php | 18 +-- 2 files changed, 111 insertions(+), 21 deletions(-) diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 9f3db26a2d..0551c930c6 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -72,20 +72,62 @@ class CategoryRepository implements CategoryRepositoryInterface return true; } - /** @noinspection MoreThanThreeArgumentsInspection */ /** * @param Collection $categories * @param Collection $accounts * @param Carbon $start * @param Carbon $end * - * @return string + * @return array */ - public function earnedInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string + public function earnedInPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): array { - $set = $this->earnedInPeriodCollection($categories, $accounts, $start, $end); + /** @var GroupCollectorInterface $collector */ + $collector = app(GroupCollectorInterface::class); - return $this->sumJournals($set); + + $collector->setUser($this->user); + $collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setCategory($category); + + if ($accounts->count() > 0) { + $collector->setAccounts($accounts); + } + // collect and group results: + $array = $collector->getExtractedJournals(); + $return = []; + + foreach ($array as $journal) { + $currencyCode = $journal['currency_code']; + if (!isset($return[$currencyCode])) { + $return[$currencyCode] = [ + 'currency_id' => $journal['currency_id'], + 'currency_code' => $journal['currency_code'], + 'currency_name' => $journal['currency_name'], + 'currency_symbol' => $journal['currency_symbol'], + 'currency_decimal_places' => $journal['currency_decimal_places'], + 'earned' => '0', + ]; + } + + // also extract foreign currency information: + if (null !== $journal['foreign_currency_id']) { + $currencyCode = $journal['foreign_currency_code']; + if (!isset($return[$currencyCode])) { + $return[$currencyCode] = [ + 'currency_id' => $journal['foreign_currency_id'], + 'currency_code' => $journal['foreign_currency_code'], + 'currency_name' => $journal['foreign_currency_name'], + 'currency_symbol' => $journal['foreign_currency_symbol'], + 'currency_decimal_places' => $journal['foreign_currency_decimal_places'], + 'earned' => '0', + ]; + } + $return[$currencyCode]['earned'] = bcadd($return[$currencyCode]['earned'], app('steam')->positive($journal['foreign_amount'])); + } + $return[$currencyCode]['earned'] = bcadd($return[$currencyCode]['earned'], app('steam')->positive($journal['amount'])); + } + + return $return; } /** @noinspection MoreThanThreeArgumentsInspection */ @@ -561,18 +603,61 @@ class CategoryRepository implements CategoryRepositoryInterface } /** - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end + * Returns the amount spent in a category, for a set of accounts, in a specific period. * - * @return string + * @param Category $category + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array */ - public function spentInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string + public function spentInPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): array { - $array = $this->spentInPeriodCollection($categories, $accounts, $start, $end); + /** @var GroupCollectorInterface $collector */ + $collector = app(GroupCollectorInterface::class); + $collector->setUser($this->user); + $collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setCategory($category); - return $this->sumJournals($array); + if ($accounts->count() > 0) { + $collector->setAccounts($accounts); + } + // collect and group results: + $array = $collector->getExtractedJournals(); + $return = []; + + foreach ($array as $journal) { + $currencyCode = $journal['currency_code']; + if (!isset($return[$currencyCode])) { + $return[$currencyCode] = [ + 'currency_id' => $journal['currency_id'], + 'currency_code' => $journal['currency_code'], + 'currency_name' => $journal['currency_name'], + 'currency_symbol' => $journal['currency_symbol'], + 'currency_decimal_places' => $journal['currency_decimal_places'], + 'spent' => '0', + ]; + } + + // also extract foreign currency information: + if (null !== $journal['foreign_currency_id']) { + $currencyCode = $journal['foreign_currency_code']; + if (!isset($return[$currencyCode])) { + $return[$currencyCode] = [ + 'currency_id' => $journal['foreign_currency_id'], + 'currency_code' => $journal['foreign_currency_code'], + 'currency_name' => $journal['foreign_currency_name'], + 'currency_symbol' => $journal['foreign_currency_symbol'], + 'currency_decimal_places' => $journal['foreign_currency_decimal_places'], + 'spent' => '0', + ]; + } + $return[$currencyCode]['spent'] = bcadd($return[$currencyCode]['spent'], $journal['foreign_amount']); + } + $return[$currencyCode]['spent'] = bcadd($return[$currencyCode]['spent'], $journal['amount']); + } + + return $return; } /** @@ -714,7 +799,10 @@ class CategoryRepository implements CategoryRepositoryInterface } /** + * TODO does not take currencies into account. + * * @param array $journals + * * @return string */ private function sumJournals(array $journals): string diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index 52a136d37d..8a062b7194 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -49,14 +49,16 @@ interface CategoryRepositoryInterface public function destroy(Category $category): bool; /** - * @param Collection $categories + * Returns the amount earned in a category, for a set of accounts, in a specific period. + * + * @param Category $category * @param Collection $accounts * @param Carbon $start * @param Carbon $end * - * @return string + * @return array */ - public function earnedInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string; + public function earnedInPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): array; /** @noinspection MoreThanThreeArgumentsInspection */ @@ -204,17 +206,17 @@ interface CategoryRepositoryInterface */ public function setUser(User $user); - /** @noinspection MoreThanThreeArgumentsInspection */ - /** - * @param Collection $categories + * Returns the amount spent in a category, for a set of accounts, in a specific period. + * + * @param Category $category * @param Collection $accounts * @param Carbon $start * @param Carbon $end * - * @return string + * @return array */ - public function spentInPeriod(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): string; + public function spentInPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): array; /** * @param Collection $categories From d96e77a3ecb2be61fa8dd727d01fe630cbcd474d Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:18:51 +0200 Subject: [PATCH 06/65] Use new methods from category repository --- .../Controllers/Chart/CategoryController.php | 115 +++++++----------- .../Controllers/Report/CategoryController.php | 38 +++++- 2 files changed, 78 insertions(+), 75 deletions(-) diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 50c6694dbd..b96e2a5d5f 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Chart; use Carbon\Carbon; +use Exception; use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\AccountType; @@ -32,6 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; +use FireflyIII\Support\Chart\Category\WholePeriodChartGenerator; use FireflyIII\Support\Http\Controllers\AugumentData; use FireflyIII\Support\Http\Controllers\ChartGeneration; use FireflyIII\Support\Http\Controllers\DateCalculation; @@ -66,89 +68,32 @@ class CategoryController extends Controller * TODO this chart is not multi-currency aware. * * @param CategoryRepositoryInterface $repository - * @param AccountRepositoryInterface $accountRepository * @param Category $category * * @return JsonResponse * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function all(CategoryRepositoryInterface $repository, AccountRepositoryInterface $accountRepository, Category $category): JsonResponse + public function all(CategoryRepositoryInterface $repository, Category $category): JsonResponse { + // cache results: $cache = new CacheProperties; $cache->addProperty('chart.category.all'); $cache->addProperty($category->id); if ($cache->has()) { - return response()->json($cache->get()); // @codeCoverageIgnore + //return response()->json($cache->get()); // @codeCoverageIgnore } - $start = $repository->firstUseDate($category); - $start = $start ?? new Carbon; + $start = $repository->firstUseDate($category) ?? $this->getDate(); $range = app('preferences')->get('viewRange', '1M')->data; $start = app('navigation')->startOfPeriod($start, $range); - $end = new Carbon; - $accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); + $end = $this->getDate(); Log::debug(sprintf('Full range is %s to %s', $start->format('Y-m-d'), $end->format('Y-m-d'))); - $chartData = [ - [ - 'label' => (string)trans('firefly.spent'), - 'entries' => [], 'type' => 'bar', - 'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red - ], - [ - 'label' => (string)trans('firefly.earned'), - 'entries' => [], 'type' => 'bar', - 'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green - ], - [ - 'label' => (string)trans('firefly.sum'), - 'entries' => [], 'type' => 'line', 'fill' => false, - ], - ]; - $step = $this->calculateStep($start, $end); - /** @var Carbon $current */ - $current = clone $start; - - Log::debug(sprintf('abc Step is %s', $step)); - - switch ($step) { - case '1D': - while ($current <= $end) { - //Log::debug(sprintf('Current day is %s', $current->format('Y-m-d'))); - $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $current, $current); - $earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $current, $current); - $sum = bcadd($spent, $earned); - $label = app('navigation')->periodShow($current, $step); - $chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 12); - $chartData[1]['entries'][$label] = round($earned, 12); - $chartData[2]['entries'][$label] = round($sum, 12); - $current->addDay(); - } - break; - // @codeCoverageIgnoreStart - // for some reason it doesn't pick up on these case entries. - case '1W': - case '1M': - case '1Y': - // @codeCoverageIgnoreEnd - while ($current <= $end) { - $currentEnd = app('navigation')->endOfPeriod($current, $step); - //Log::debug(sprintf('abc Range is %s to %s', $current->format('Y-m-d'), $currentEnd->format('Y-m-d'))); - - $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $current, $currentEnd); - $earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $current, $currentEnd); - $sum = bcadd($spent, $earned); - $label = app('navigation')->periodShow($current, $step); - $chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 12); - $chartData[1]['entries'][$label] = round($earned, 12); - $chartData[2]['entries'][$label] = round($sum, 12); - $current = app('navigation')->addPeriod($current, $step, 0); - } - break; - } - - $data = $this->generator->multiSet($chartData); + /** @var WholePeriodChartGenerator $generator */ + $generator = app(WholePeriodChartGenerator::class); + $chartData = $generator->generate($category, $start, $end); + $data = $this->generator->multiSet($chartData); $cache->store($data); return response()->json($data); @@ -383,8 +328,6 @@ class CategoryController extends Controller /** * Chart for a specific period. * - * TODO this chart is not multi-currency aware. - * * @param Category $category * @param $date * @@ -399,8 +342,42 @@ class CategoryController extends Controller [$end, $start] = [$start, $end]; // @codeCoverageIgnore } - $data = $this->makePeriodChart($category, $start, $end); + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty($category->id); + $cache->addProperty('chart.category.period-chart'); + + + if ($cache->has()) { + return response()->json($cache->get()); // @codeCoverageIgnore + } + + /** @var GeneratorInterface $generator */ + $generator = app(GeneratorInterface::class); + + /** @var WholePeriodChartGenerator $chartGenerator */ + $chartGenerator = app(WholePeriodChartGenerator::class); + $chartData = $chartGenerator->generate($category, $start, $end); + $data = $generator->multiSet($chartData); + + $cache->store($data); return response()->json($data); } + + /** + * @return Carbon + */ + private function getDate(): Carbon + { + $carbon = null; + try { + $carbon = new Carbon; + } catch (Exception $e) { + $e->getMessage(); + } + + return $carbon; + } } diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index b8bc618745..1d9d5629db 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -165,7 +165,7 @@ class CategoryController extends Controller $cache->addProperty('category-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); // @codeCoverageIgnore + //return $cache->get(); // @codeCoverageIgnore } /** @var CategoryRepositoryInterface $repository */ @@ -174,17 +174,29 @@ class CategoryController extends Controller $report = []; /** @var Category $category */ foreach ($categories as $category) { - $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end); - $earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $start, $end); - if (0 !== bccomp($spent, '0') || 0 !== bccomp($earned, '0')) { - $report[$category->id] = ['name' => $category->name, 'spent' => $spent, 'earned' => $earned, 'id' => $category->id]; + $spent = $repository->spentInPeriod($category, $accounts, $start, $end); + $earned = $repository->earnedInPeriod($category, $accounts, $start, $end); + $currencies = array_keys($spent) + array_keys($earned); + foreach ($currencies as $code) { + $currencyInfo = $spent[$code] ?? $earned[$code]; + $report[$category->id] = [ + 'name' => sprintf('%s (%s)', $category->name, $code), + 'spent' => round($spent[$code]['spent'] ?? '0', $currencyInfo['currency_decimal_places']), + 'earned' => round($earned[$code]['earned'] ?? '0', $currencyInfo['currency_decimal_places']), + 'id' => $category->id, + 'currency_id' => $currencyInfo['currency_id'], + 'currency_code' => $currencyInfo['currency_code'], + 'currency_symbol' => $currencyInfo['currency_symbol'], + 'cyrrency_decimal_places' => $currencyInfo['currency_decimal_places'], + ]; } } $sum = []; foreach ($report as $categoryId => $row) { - $sum[$categoryId] = (float)$row['spent']; + $sum[$categoryId] = (float)$row['spent']; } array_multisort($sum, SORT_ASC, $report); + // @codeCoverageIgnoreStart try { $result = view('reports.partials.categories', compact('report'))->render(); @@ -199,5 +211,19 @@ class CategoryController extends Controller return $result; } + /** + * @param array $array + * + * @return bool + */ + private function noAmountInArray(array $array): bool + { + if (0 === count($array)) { + return true; + } + + return false; + } + } From 713a962005b8ba89eb97d400dfc79dfbfcf2d5e9 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:19:06 +0200 Subject: [PATCH 07/65] Log errors instead of giving exceptions --- app/Support/Navigation.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 1850087b94..d99daae6f4 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -25,6 +25,7 @@ namespace FireflyIII\Support; use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Fiscal\FiscalHelperInterface; +use Log; /** * Class Navigation. @@ -37,8 +38,6 @@ class Navigation * @param $skip * * @return \Carbon\Carbon - * - * @throws \FireflyIII\Exceptions\FireflyException */ public function addPeriod(Carbon $theDate, string $repeatFreq, int $skip): Carbon { @@ -73,7 +72,9 @@ class Navigation ]; if (!isset($functionMap[$repeatFreq])) { - throw new FireflyException(sprintf('Cannot do addPeriod for $repeat_freq "%s"', $repeatFreq)); + Log::error(sprintf('Cannot do addPeriod for $repeat_freq "%s"', $repeatFreq)); + + return $theDate; } if (isset($modifierMap[$repeatFreq])) { $add *= $modifierMap[$repeatFreq]; @@ -169,8 +170,6 @@ class Navigation * @param $repeatFreq * * @return \Carbon\Carbon - * - * @throws \FireflyIII\Exceptions\FireflyException */ public function endOfPeriod(\Carbon\Carbon $end, string $repeatFreq): Carbon { @@ -220,7 +219,9 @@ class Navigation if (!isset($functionMap[$repeatFreq])) { - throw new FireflyException(sprintf('Cannot do endOfPeriod for $repeat_freq "%s"', $repeatFreq)); + Log::error(sprintf('Cannot do endOfPeriod for $repeat_freq "%s"', $repeatFreq)); + + return $end; } $function = $functionMap[$repeatFreq]; @@ -323,8 +324,6 @@ class Navigation * @param string $repeatFrequency * * @return string - * - * @throws \FireflyIII\Exceptions\FireflyException */ public function periodShow(\Carbon\Carbon $theDate, string $repeatFrequency): string { @@ -355,7 +354,10 @@ class Navigation } // special formatter for quarter of year - throw new FireflyException(sprintf('No date formats for frequency "%s"!', $repeatFrequency)); + Log::error(sprintf('No date formats for frequency "%s"!', $repeatFrequency)); + + return $date->format('Y-m-d'); + } /** @@ -478,8 +480,6 @@ class Navigation * @param $repeatFreq * * @return \Carbon\Carbon - * - * @throws \FireflyIII\Exceptions\FireflyException */ public function startOfPeriod(Carbon $theDate, string $repeatFreq): Carbon { @@ -520,8 +520,10 @@ class Navigation if ('custom' === $repeatFreq) { return $date; // the date is already at the start. } + Log::error(sprintf('Cannot do startOfPeriod for $repeat_freq "%s"', $repeatFreq)); + + return $theDate; - throw new FireflyException(sprintf('Cannot do startOfPeriod for $repeat_freq "%s"', $repeatFreq)); } /** From 5eadb51b788429c48309da47a52a139218d428df Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:19:13 +0200 Subject: [PATCH 08/65] Some refactoring. --- resources/lang/en_US/firefly.php | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 80ab62d925..c23138e724 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -1397,19 +1397,20 @@ return [ 'skip_transaction' => 'Skip the occurence', 'jump_to_friday' => 'Create the transaction on the previous Friday instead', 'jump_to_monday' => 'Create the transaction on the next Monday instead', - 'will_jump_friday' => 'Will be created on Friday instead of the weekends.', - 'will_jump_monday' => 'Will be created on Monday instead of the weekends.', - 'except_weekends' => 'Except weekends', - 'recurrence_deleted' => 'Recurring transaction ":title" deleted', + 'will_jump_friday' => 'Will be created on Friday instead of the weekends.', + 'will_jump_monday' => 'Will be created on Monday instead of the weekends.', + 'except_weekends' => 'Except weekends', + 'recurrence_deleted' => 'Recurring transaction ":title" deleted', // new lines for summary controller. - 'box_balance_in_currency' => 'Balance (:currency)', - 'box_spent_in_currency' => 'Spent (:currency)', - 'box_earned_in_currency' => 'Earned (:currency)', - 'box_bill_paid_in_currency' => 'Bills paid (:currency)', - 'box_bill_unpaid_in_currency' => 'Bills unpaid (:currency)', - 'box_left_to_spend_in_currency' => 'Left to spend (:currency)', - 'box_net_worth_in_currency' => 'Net worth (:currency)', - 'box_spend_per_day' => 'Left to spend per day: :amount', + 'box_balance_in_currency' => 'Balance (:currency)', + 'box_spent_in_currency' => 'Spent (:currency)', + 'box_earned_in_currency' => 'Earned (:currency)', + 'box_sum_in_currency' => 'Sum (:currency)', + 'box_bill_paid_in_currency' => 'Bills paid (:currency)', + 'box_bill_unpaid_in_currency' => 'Bills unpaid (:currency)', + 'box_left_to_spend_in_currency' => 'Left to spend (:currency)', + 'box_net_worth_in_currency' => 'Net worth (:currency)', + 'box_spend_per_day' => 'Left to spend per day: :amount', ]; From 499e7136831170b3c62fa88402e82d81916cac20 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:24:33 +0200 Subject: [PATCH 09/65] Remove unused methods. --- .../Category/CategoryRepository.php | 47 ----------- .../Category/CategoryRepositoryInterface.php | 24 ------ app/Transformers/CategoryTransformer.php | 77 +------------------ 3 files changed, 2 insertions(+), 146 deletions(-) diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 0551c930c6..926b7f8da7 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -130,29 +130,6 @@ class CategoryRepository implements CategoryRepositoryInterface return $return; } - /** @noinspection MoreThanThreeArgumentsInspection */ - /** - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return array - */ - public function earnedInPeriodCollection(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array - { - /** @var GroupCollectorInterface $collector */ - $collector = app(GroupCollectorInterface::class); - $collector->setUser($this->user); - if (0 !== $accounts->count()) { - $collector->setAccounts($accounts); - } - - $collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setCategories($categories); - - return $collector->getExtractedJournals(); - } - /** * A very cryptic method name that means: * @@ -660,30 +637,6 @@ class CategoryRepository implements CategoryRepositoryInterface return $return; } - /** - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return array - */ - public function spentInPeriodCollection(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array - { - /** @var GroupCollectorInterface $collector */ - $collector = app(GroupCollectorInterface::class); - - - $collector->setUser($this->user); - $collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setCategories($categories); - - if ($accounts->count() > 0) { - $collector->setAccounts($accounts); - } - - return $collector->getExtractedJournals(); - } - /** * A very cryptic method name that means: * diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index 8a062b7194..a6eaad7bcf 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -60,20 +60,6 @@ interface CategoryRepositoryInterface */ public function earnedInPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): array; - /** @noinspection MoreThanThreeArgumentsInspection */ - - /** - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return array - */ - public function earnedInPeriodCollection(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array; - - /** @noinspection MoreThanThreeArgumentsInspection */ - /** * A very cryptic method name that means: * @@ -218,16 +204,6 @@ interface CategoryRepositoryInterface */ public function spentInPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): array; - /** - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return array - */ - public function spentInPeriodCollection(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array; - /** * A very cryptic method name that means: * diff --git a/app/Transformers/CategoryTransformer.php b/app/Transformers/CategoryTransformer.php index fec2cb6141..5f771b7aae 100644 --- a/app/Transformers/CategoryTransformer.php +++ b/app/Transformers/CategoryTransformer.php @@ -68,8 +68,8 @@ class CategoryTransformer extends AbstractTransformer $start = $this->parameters->get('start'); $end = $this->parameters->get('end'); if (null !== $start && null !== $end) { - $spent = $this->getSpentInformation($category, $start, $end); - $earned = $this->getEarnedInformation($category, $start, $end); + $earned = array_values($this->repository->earnedInPeriod($category, new Collection, $start, $end)); + $spent = array_values($this->repository->spentInPeriod($category, new Collection, $start, $end)); } $data = [ 'id' => (int)$category->id, @@ -88,77 +88,4 @@ class CategoryTransformer extends AbstractTransformer return $data; } - - /** - * @param Category $category - * @param Carbon $start - * @param Carbon $end - * - * @return array - */ - private function getEarnedInformation(Category $category, Carbon $start, Carbon $end): array - { - $collection = $this->repository->earnedInPeriodCollection(new Collection([$category]), new Collection, $start, $end); - $return = []; - $total = []; - $currencies = []; - /** @var Transaction $transaction */ - foreach ($collection as $transaction) { - $code = $transaction->transaction_currency_code; - if (!isset($currencies[$code])) { - $currencies[$code] = $transaction->transactionCurrency; - } - $total[$code] = isset($total[$code]) ? bcadd($total[$code], $transaction->transaction_amount) : $transaction->transaction_amount; - } - foreach ($total as $code => $earned) { - /** @var TransactionCurrency $currency */ - $currency = $currencies[$code]; - $return[] = [ - 'currency_id' => $currency->id, - 'currency_code' => $code, - 'currency_symbol' => $currency->symbol, - 'currency_decimal_places' => $currency->decimal_places, - 'amount' => round($earned, $currency->decimal_places), - ]; - } - - return $return; - } - - /** - * @param Category $category - * @param Carbon $start - * @param Carbon $end - * - * @return array - */ - private function getSpentInformation(Category $category, Carbon $start, Carbon $end): array - { - $collection = $this->repository->spentInPeriodCollection(new Collection([$category]), new Collection, $start, $end); - $return = []; - $total = []; - $currencies = []; - /** @var Transaction $transaction */ - foreach ($collection as $transaction) { - $code = $transaction->transaction_currency_code; - if (!isset($currencies[$code])) { - $currencies[$code] = $transaction->transactionCurrency; - } - $total[$code] = isset($total[$code]) ? bcadd($total[$code], $transaction->transaction_amount) : $transaction->transaction_amount; - } - foreach ($total as $code => $spent) { - /** @var TransactionCurrency $currency */ - $currency = $currencies[$code]; - $return[] = [ - 'currency_id' => $currency->id, - 'currency_code' => $code, - 'currency_symbol' => $currency->symbol, - 'currency_decimal_places' => $currency->decimal_places, - 'amount' => round($spent, $currency->decimal_places), - ]; - } - - return $return; - } - } From 5b969fa014e9753cc51fcdc7668f40303283dd3e Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:34:32 +0200 Subject: [PATCH 10/65] Fix LDAP in ARM --- Dockerfile.arm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index 55202f7e3a..dad09a3eeb 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -8,12 +8,15 @@ LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload # Install stuff Firefly III runs with & depends on: php extensions, locales, dev headers and composer -RUN apt-get update && apt-get install -y locales unzip && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y locales unzip libldap2-dev && apt-get clean && rm -rf /var/lib/apt/lists/* ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ +RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \ + +# Use script for RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \ - install-php-extensions --cleanup bcmath ldap gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached + install-php-extensions --cleanup bcmath gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached RUN a2enmod rewrite && a2enmod ssl RUN echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen From e9f469535594bb3807ce50870f0fecaa0ad5a626 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 18:44:57 +0200 Subject: [PATCH 11/65] Fix ARM script. --- Dockerfile.arm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index dad09a3eeb..f285be411e 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -12,16 +12,16 @@ RUN apt-get update && apt-get install -y locales unzip libldap2-dev && apt-get c ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ -RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \ +RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ # Use script for -RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \ - install-php-extensions --cleanup bcmath gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && install-php-extensions --cleanup bcmath gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached -RUN a2enmod rewrite && a2enmod ssl -RUN echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen -RUN locale-gen -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +# another thing. +RUN a2enmod rewrite && a2enmod ssl && \ + echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \ + locale-gen && \ + curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Copy in Firefly III source WORKDIR $FIREFLY_PATH From 24b30af018b0ab59c8d5b5c9cee3754b9487f1b2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 19:31:42 +0200 Subject: [PATCH 12/65] Install extension. --- Dockerfile.arm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index f285be411e..894caee234 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -12,10 +12,13 @@ RUN apt-get update && apt-get install -y locales unzip libldap2-dev && apt-get c ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ +# Use script for all extensions. +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && install-php-extensions --cleanup bcmath gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached + +# Then install LDAP RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ -# Use script for -RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && install-php-extensions --cleanup bcmath gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached +RUN docker-php-ext-install -j$(nproc) ldap # another thing. RUN a2enmod rewrite && a2enmod ssl && \ From 4719b8731413c3b921c010d7d7680b8219236174 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 12 Aug 2019 19:53:54 +0200 Subject: [PATCH 13/65] Try the ARM thing with my own version of the script. --- Dockerfile.arm | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index 894caee234..553136be95 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -8,23 +8,17 @@ LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload # Install stuff Firefly III runs with & depends on: php extensions, locales, dev headers and composer -RUN apt-get update && apt-get install -y locales unzip libldap2-dev && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y locales unzip && apt-get clean && rm -rf /var/lib/apt/lists/* -ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ +ADD https://raw.githubusercontent.com/JC5/docker-php-extension-installer/patch-2/install-php-extensions /usr/local/bin/ -# Use script for all extensions. -RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && install-php-extensions --cleanup bcmath gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached +RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \ + install-php-extensions --cleanup bcmath ldap gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached -# Then install LDAP -RUN docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ - -RUN docker-php-ext-install -j$(nproc) ldap - -# another thing. -RUN a2enmod rewrite && a2enmod ssl && \ - echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \ - locale-gen && \ - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +RUN a2enmod rewrite && a2enmod ssl +RUN echo "hu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen +RUN locale-gen +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Copy in Firefly III source WORKDIR $FIREFLY_PATH From ed565136fcc9f500a0ddc07f08a54bf8fa81568f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 13 Aug 2019 16:00:35 +0200 Subject: [PATCH 14/65] Fix #2415 --- public/v1/js/app.js | 2 +- .../assets/js/components/transactions/CreateTransaction.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/v1/js/app.js b/public/v1/js/app.js index 8fd9c3f20a..7e1fbe5f93 100644 --- a/public/v1/js/app.js +++ b/public/v1/js/app.js @@ -1 +1 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=17)}([function(t,e,n){"use strict";var r=n(10),i=n(24),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){c.headers[t]={}}),r.forEach(["post","put","patch"],function(t){c.headers[t]=r.merge(o)}),t.exports=c}).call(this,n(11))},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i=0&&l.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return g(e,t.attrs),h(t,e),e}function g(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function y(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var a=u++;n=c||(c=m(e)),r=b.bind(null,n,a,!1),i=b.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=f(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var r=[],i=0;i1)for(var n=1;nn.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i div[data-v-61d92e31] {\n cursor: pointer;\n padding: 3px 6px;\n width: 100%;\n}\n.ti-selected-item[data-v-61d92e31] {\n background-color: #5C6BC0;\n color: #fff;\n}\n',"",{version:3,sources:["C:/Users/johan/dev/vue-tags-input/vue-tags-input/C:/Users/johan/dev/vue-tags-input/vue-tags-input/vue-tags-input.scss"],names:[],mappings:"AAAA;EACE,uBAAuB;EACvB,mCAA8C;EAC9C,+JAAuM;EACvM,oBAAoB;EACpB,mBAAmB;CAAE;AAEvB;EACE,kCAAkC;EAClC,YAAY;EACZ,mBAAmB;EACnB,oBAAoB;EACpB,qBAAqB;EACrB,qBAAqB;EACrB,eAAe;EACf,oCAAoC;EACpC,mCAAmC;CAAE;AAEvC;EACE,iBAAiB;CAAE;AAErB;EACE,iBAAiB;CAAE;AAErB;EACE,iBAAiB;CAAE;AAErB;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;CAAE;AAE1B;EACE,uBAAuB;CAAE;AAE3B;EACE,cAAc;CAAE;AAElB;EACE,8BAA8B;CAAE;AAElC;EACE,iBAAiB;EACjB,mBAAmB;EACnB,uBAAuB;CAAE;AAE3B;EACE,aAAa;CAAE;AACf;IACE,gBAAgB;CAAE;AAEtB;EACE,uBAAuB;EACvB,cAAc;EACd,aAAa;EACb,gBAAgB;CAAE;AAEpB;EACE,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,iBAAiB;CAAE;AAErB;EACE,0BAA0B;EAC1B,YAAY;EACZ,mBAAmB;EACnB,cAAc;EACd,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;CAAE;AACnB;IACE,cAAc;CAAE;AAClB;IACE,cAAc;IACd,oBAAoB;CAAE;AACxB;IACE,mBAAmB;CAAE;AACvB;IACE,mBAAmB;CAAE;AACvB;IACE,mBAAmB;IACnB,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;CAAE;AACrB;IACE,iBAAiB;IACjB,cAAc;IACd,oBAAoB;IACpB,kBAAkB;CAAE;AACpB;MACE,gBAAgB;CAAE;AACtB;IACE,kBAAkB;CAAE;AACtB;IACE,0BAA0B;CAAE;AAEhC;EACE,cAAc;EACd,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;CAAE;AACnB;IACE,eAAe;IACf,iBAAiB;IACjB,aAAa;IACb,aAAa;IACb,YAAY;CAAE;AAElB;EACE,qBAAqB;CAAE;AAEzB;EACE,uBAAuB;EACvB,iBAAiB;EACjB,mBAAmB;EACnB,YAAY;EACZ,uBAAuB;EACvB,YAAY;CAAE;AAEhB;EACE,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;CAAE;AAEhB;EACE,0BAA0B;EAC1B,YAAY;CAAE",file:"vue-tags-input.scss?vue&type=style&index=0&id=61d92e31&lang=scss&scoped=true&",sourcesContent:['@font-face {\n font-family: \'icomoon\';\n src: url("./assets/fonts/icomoon.eot?7grlse");\n src: url("./assets/fonts/icomoon.eot?7grlse#iefix") format("embedded-opentype"), url("./assets/fonts/icomoon.ttf?7grlse") format("truetype"), url("./assets/fonts/icomoon.woff?7grlse") format("woff");\n font-weight: normal;\n font-style: normal; }\n\n[class^="ti-icon-"], [class*=" ti-icon-"] {\n font-family: \'icomoon\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale; }\n\n.ti-icon-check:before {\n content: "\\e902"; }\n\n.ti-icon-close:before {\n content: "\\e901"; }\n\n.ti-icon-undo:before {\n content: "\\e900"; }\n\nul {\n margin: 0px;\n padding: 0px;\n list-style-type: none; }\n\n*, *:before, *:after {\n box-sizing: border-box; }\n\ninput:focus {\n outline: none; }\n\ninput[disabled] {\n background-color: transparent; }\n\n.vue-tags-input {\n max-width: 450px;\n position: relative;\n background-color: #fff; }\n\ndiv.vue-tags-input.disabled {\n opacity: 0.5; }\n div.vue-tags-input.disabled * {\n cursor: default; }\n\n.ti-input {\n border: 1px solid #ccc;\n display: flex;\n padding: 4px;\n flex-wrap: wrap; }\n\n.ti-tags {\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n line-height: 1em; }\n\n.ti-tag {\n background-color: #5C6BC0;\n color: #fff;\n border-radius: 2px;\n display: flex;\n padding: 3px 5px;\n margin: 2px;\n font-size: .85em; }\n .ti-tag:focus {\n outline: none; }\n .ti-tag .ti-content {\n display: flex;\n align-items: center; }\n .ti-tag .ti-tag-center {\n position: relative; }\n .ti-tag span {\n line-height: .85em; }\n .ti-tag span.ti-hidden {\n padding-left: 14px;\n visibility: hidden;\n height: 0px;\n white-space: pre; }\n .ti-tag .ti-actions {\n margin-left: 2px;\n display: flex;\n align-items: center;\n font-size: 1.15em; }\n .ti-tag .ti-actions i {\n cursor: pointer; }\n .ti-tag:last-child {\n margin-right: 4px; }\n .ti-tag.ti-invalid, .ti-tag.ti-tag.ti-deletion-mark {\n background-color: #e54d42; }\n\n.ti-new-tag-input-wrapper {\n display: flex;\n flex: 1 0 auto;\n padding: 3px 5px;\n margin: 2px;\n font-size: .85em; }\n .ti-new-tag-input-wrapper input {\n flex: 1 0 auto;\n min-width: 100px;\n border: none;\n padding: 0px;\n margin: 0px; }\n\n.ti-new-tag-input {\n line-height: initial; }\n\n.ti-autocomplete {\n border: 1px solid #ccc;\n border-top: none;\n position: absolute;\n width: 100%;\n background-color: #fff;\n z-index: 20; }\n\n.ti-item > div {\n cursor: pointer;\n padding: 3px 6px;\n width: 100%; }\n\n.ti-selected-item {\n background-color: #5C6BC0;\n color: #fff; }\n'],sourceRoot:""}])},function(t,e,n){"use strict";t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="data:font/ttf;base64,AAEAAAALAIAAAwAwT1MvMg8SBawAAAC8AAAAYGNtYXAXVtKJAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZqWfozAAAAF4AAAA/GhlYWQPxZgIAAACdAAAADZoaGVhB4ADyAAAAqwAAAAkaG10eBIAAb4AAALQAAAAHGxvY2EAkgDiAAAC7AAAABBtYXhwAAkAHwAAAvwAAAAgbmFtZZlKCfsAAAMcAAABhnBvc3QAAwAAAAAEpAAAACAAAwOAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpAgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6QL//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAFYBAQO+AoEAHAAAATIXHgEXFhcHJicuAScmIyIGBxchERc2Nz4BNzYCFkpDQ28pKRdkECAfVTM0OT9wLZz+gJgdIiJLKSgCVRcYUjg5QiAzKys+ERIrJZoBgJoZFRQcCAgAAQDWAIEDKgLVAAsAAAEHFwcnByc3JzcXNwMq7u487u487u487u4Cme7uPO7uPO7uPO7uAAEAkgCBA4ACvQAFAAAlARcBJzcBgAHEPP4A7jz5AcQ8/gDuPAAAAAABAAAAAAAAH8nTUV8PPPUACwQAAAAAANZ1KhsAAAAA1nUqGwAAAAADvgLVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAO+AAEAAAAAAAAAAAAAAAAAAAAHBAAAAAAAAAAAAAAAAgAAAAQAAFYEAADWBAAAkgAAAAAACgAUAB4AUABqAH4AAQAAAAcAHQABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},function(t,e){t.exports="data:font/woff;base64,d09GRgABAAAAAAUQAAsAAAAABMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIFrGNtYXAAAAFoAAAAVAAAAFQXVtKJZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAPwAAAD8pZ+jMGhlYWQAAALAAAAANgAAADYPxZgIaGhlYQAAAvgAAAAkAAAAJAeAA8hobXR4AAADHAAAABwAAAAcEgABvmxvY2EAAAM4AAAAEAAAABAAkgDibWF4cAAAA0gAAAAgAAAAIAAJAB9uYW1lAAADaAAAAYYAAAGGmUoJ+3Bvc3QAAATwAAAAIAAAACAAAwAAAAMDgAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QIDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkC//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQBWAQEDvgKBABwAAAEyFx4BFxYXByYnLgEnJiMiBgcXIREXNjc+ATc2AhZKQ0NvKSkXZBAgH1UzNDk/cC2c/oCYHSIiSykoAlUXGFI4OUIgMysrPhESKyWaAYCaGRUUHAgIAAEA1gCBAyoC1QALAAABBxcHJwcnNyc3FzcDKu7uPO7uPO7uPO7uApnu7jzu7jzu7jzu7gABAJIAgQOAAr0ABQAAJQEXASc3AYABxDz+AO48+QHEPP4A7jwAAAAAAQAAAAAAAB/J01FfDzz1AAsEAAAAAADWdSobAAAAANZ1KhsAAAAAA74C1QAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAADvgABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABWBAAA1gQAAJIAAAAAAAoAFAAeAFAAagB+AAEAAAAHAB0AAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vue-tags-input",class:[{"ti-disabled":t.disabled},{"ti-focus":t.focused}]},[n("div",{staticClass:"ti-input"},[t.tagsCopy?n("ul",{staticClass:"ti-tags"},[t._l(t.tagsCopy,function(e,r){return n("li",{key:r,staticClass:"ti-tag",class:[{"ti-editing":t.tagsEditStatus[r]},e.tiClasses,e.classes,{"ti-deletion-mark":t.isMarked(r)}],style:e.style,attrs:{tabindex:"0"},on:{click:function(n){return t.$emit("tag-clicked",{tag:e,index:r})}}},[n("div",{staticClass:"ti-content"},[t.$scopedSlots["tag-left"]?n("div",{staticClass:"ti-tag-left"},[t._t("tag-left",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2):t._e(),t._v(" "),n("div",{ref:"tagCenter",refInFor:!0,staticClass:"ti-tag-center"},[t.$scopedSlots["tag-center"]?t._e():n("span",{class:{"ti-hidden":t.tagsEditStatus[r]},on:{click:function(e){return t.performEditTag(r)}}},[t._v(t._s(e.text))]),t._v(" "),t.$scopedSlots["tag-center"]?t._e():n("tag-input",{attrs:{scope:{edit:t.tagsEditStatus[r],maxlength:t.maxlength,tag:e,index:r,validateTag:t.createChangedTag,performCancelEdit:t.cancelEdit,performSaveEdit:t.performSaveTag}}}),t._v(" "),t._t("tag-center",null,{tag:e,index:r,maxlength:t.maxlength,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,validateTag:t.createChangedTag,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2),t._v(" "),t.$scopedSlots["tag-right"]?n("div",{staticClass:"ti-tag-right"},[t._t("tag-right",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2):t._e()]),t._v(" "),n("div",{staticClass:"ti-actions"},[t.$scopedSlots["tag-actions"]?t._e():n("i",{directives:[{name:"show",rawName:"v-show",value:t.tagsEditStatus[r],expression:"tagsEditStatus[index]"}],staticClass:"ti-icon-undo",on:{click:function(e){return t.cancelEdit(r)}}}),t._v(" "),t.$scopedSlots["tag-actions"]?t._e():n("i",{directives:[{name:"show",rawName:"v-show",value:!t.tagsEditStatus[r],expression:"!tagsEditStatus[index]"}],staticClass:"ti-icon-close",on:{click:function(e){return t.performDeleteTag(r)}}}),t._v(" "),t.$scopedSlots["tag-actions"]?t._t("tag-actions",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)}):t._e()],2)])}),t._v(" "),n("li",{staticClass:"ti-new-tag-input-wrapper"},[n("input",t._b({ref:"newTagInput",staticClass:"ti-new-tag-input",class:[t.createClasses(t.newTag,t.tags,t.validation,t.isDuplicate)],attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,type:"text",size:"1"},domProps:{value:t.newTag},on:{keydown:[function(e){return t.performAddTags(t.filteredAutocompleteItems[t.selectedItem]||t.newTag,e)},function(e){return e.type.indexOf("key")||8===e.keyCode?t.invokeDelete(e):null},function(e){return e.type.indexOf("key")||9===e.keyCode?t.performBlur(e):null},function(e){return e.type.indexOf("key")||38===e.keyCode?t.selectItem(e,"before"):null},function(e){return e.type.indexOf("key")||40===e.keyCode?t.selectItem(e,"after"):null}],paste:t.addTagsFromPaste,input:t.updateNewTag,blur:function(e){return t.$emit("blur",e)},focus:function(e){t.focused=!0,t.$emit("focus",e)},click:function(e){!t.addOnlyFromAutocomplete&&(t.selectedItem=null)}}},"input",t.$attrs,!1))])],2):t._e()]),t._v(" "),t._t("between-elements"),t._v(" "),t.autocompleteOpen?n("div",{staticClass:"ti-autocomplete",on:{mouseout:function(e){t.selectedItem=null}}},[t._t("autocomplete-header"),t._v(" "),n("ul",t._l(t.filteredAutocompleteItems,function(e,r){return n("li",{key:r,staticClass:"ti-item",class:[e.tiClasses,e.classes,{"ti-selected-item":t.isSelected(r)}],style:e.style,on:{mouseover:function(e){!t.disabled&&(t.selectedItem=r)}}},[t.$scopedSlots["autocomplete-item"]?t._t("autocomplete-item",null,{item:e,index:r,performAdd:function(e){return t.performAddTags(e,void 0,"autocomplete")},selected:t.isSelected(r)}):n("div",{on:{click:function(n){return t.performAddTags(e,void 0,"autocomplete")}}},[t._v("\n "+t._s(e.text)+"\n ")])],2)}),0),t._v(" "),t._t("autocomplete-footer")],2):t._e()],2)};r._withStripped=!0;var i=n(5),o=n.n(i),a=function(t){return JSON.parse(JSON.stringify(t))},s=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0;void 0===t.text&&(t={text:t});var i=function(t,e){return n.filter(function(e){var n=t.text;return"string"==typeof e.rule?!new RegExp(e.rule).test(n):e.rule instanceof RegExp?!e.rule.test(n):"[object Function]"==={}.toString.call(e.rule)?e.rule(t):void 0}).map(function(t){return t.classes})}(t),o=function(t,e){for(var n=0;n1?n-1:0),i=1;i1?e-1:0),r=1;r=this.autocompleteMinLength&&this.filteredAutocompleteItems.length>0&&this.focused},filteredAutocompleteItems:function(){var t=this,e=this.autocompleteItems.map(function(e){return c(e,t.tags,t.validation,t.isDuplicate)});return this.autocompleteFilterDuplicates?e.filter(this.duplicateFilter):e}},methods:{createClasses:s,getSelectedIndex:function(t){var e=this.filteredAutocompleteItems,n=this.selectedItem,r=e.length-1;if(0!==e.length)return null===n?0:"before"===t&&0===n?r:"after"===t&&n===r?0:"after"===t?n+1:n-1},selectDefaultItem:function(){this.addOnlyFromAutocomplete&&this.filteredAutocompleteItems.length>0?this.selectedItem=0:this.selectedItem=null},selectItem:function(t,e){t.preventDefault(),this.selectedItem=this.getSelectedIndex(e)},isSelected:function(t){return this.selectedItem===t},isMarked:function(t){return this.deletionMark===t},invokeDelete:function(){var t=this;if(this.deleteOnBackspace&&!(this.newTag.length>0)){var e=this.tagsCopy.length-1;null===this.deletionMark?(this.deletionMarkTime=setTimeout(function(){return t.deletionMark=null},1e3),this.deletionMark=e):this.performDeleteTag(e)}},addTagsFromPaste:function(){var t=this;this.addFromPaste&&setTimeout(function(){return t.performAddTags(t.newTag)},10)},performEditTag:function(t){var e=this;this.allowEditTags&&(this._events["before-editing-tag"]||this.editTag(t),this.$emit("before-editing-tag",{index:t,tag:this.tagsCopy[t],editTag:function(){return e.editTag(t)}}))},editTag:function(t){this.allowEditTags&&(this.toggleEditMode(t),this.focus(t))},toggleEditMode:function(t){this.allowEditTags&&!this.disabled&&this.$set(this.tagsEditStatus,t,!this.tagsEditStatus[t])},createChangedTag:function(t,e){var n=this.tagsCopy[t];n.text=e?e.target.value:this.tagsCopy[t].text,this.$set(this.tagsCopy,t,c(n,this.tagsCopy,this.validation,this.isDuplicate))},focus:function(t){var e=this;this.$nextTick(function(){var n=e.$refs.tagCenter[t].querySelector("input.ti-tag-input");n&&n.focus()})},quote:function(t){return t.replace(/([()[{*+.$^\\|?])/g,"\\$1")},cancelEdit:function(t){this.tags[t]&&(this.tagsCopy[t]=a(c(this.tags[t],this.tags,this.validation,this.isDuplicate)),this.$set(this.tagsEditStatus,t,!1))},hasForbiddingAddRule:function(t){var e=this;return t.some(function(t){var n=e.validation.find(function(e){return t===e.classes});return!!n&&n.disableAdd})},createTagTexts:function(t){var e=this,n=new RegExp(this.separators.map(function(t){return e.quote(t)}).join("|"));return t.split(n).map(function(t){return{text:t}})},performDeleteTag:function(t){var e=this;this._events["before-deleting-tag"]||this.deleteTag(t),this.$emit("before-deleting-tag",{index:t,tag:this.tagsCopy[t],deleteTag:function(){return e.deleteTag(t)}})},deleteTag:function(t){this.disabled||(this.deletionMark=null,clearTimeout(this.deletionMarkTime),this.tagsCopy.splice(t,1),this._events["update:tags"]&&this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},noTriggerKey:function(t,e){var n=-1!==this[e].indexOf(t.keyCode)||-1!==this[e].indexOf(t.key);return n&&t.preventDefault(),!n},performAddTags:function(t,e,n){var r=this;if(!(this.disabled||e&&this.noTriggerKey(e,"addOnKey"))){var i=[];"object"===y(t)&&(i=[t]),"string"==typeof t&&(i=this.createTagTexts(t)),(i=i.filter(function(t){return t.text.trim().length>0})).forEach(function(t){t=c(t,r.tags,r.validation,r.isDuplicate),r._events["before-adding-tag"]||r.addTag(t,n),r.$emit("before-adding-tag",{tag:t,addTag:function(){return r.addTag(t,n)}})})}},duplicateFilter:function(t){return this.isDuplicate?!this.isDuplicate(this.tagsCopy,t):!this.tagsCopy.find(function(e){return e.text===t.text})},addTag:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"new-tag-input",r=this.filteredAutocompleteItems.map(function(t){return t.text});this.addOnlyFromAutocomplete&&-1===r.indexOf(t.text)||this.$nextTick(function(){return e.maxTags&&e.maxTags<=e.tagsCopy.length?e.$emit("max-tags-reached",t):e.avoidAddingDuplicates&&!e.duplicateFilter(t)?e.$emit("adding-duplicate",t):void(e.hasForbiddingAddRule(t.tiClasses)||(e.$emit("input",""),e.tagsCopy.push(t),e._events["update:tags"]&&e.$emit("update:tags",e.tagsCopy),"autocomplete"===n&&e.$refs.newTagInput.focus(),e.$emit("tags-changed",e.tagsCopy)))})},performSaveTag:function(t,e){var n=this,r=this.tagsCopy[t];this.disabled||e&&this.noTriggerKey(e,"addOnKey")||0!==r.text.trim().length&&(this._events["before-saving-tag"]||this.saveTag(t,r),this.$emit("before-saving-tag",{index:t,tag:r,saveTag:function(){return n.saveTag(t,r)}}))},saveTag:function(t,e){if(this.avoidAddingDuplicates){var n=a(this.tagsCopy),r=n.splice(t,1)[0];if(this.isDuplicate?this.isDuplicate(n,r):-1!==n.map(function(t){return t.text}).indexOf(r.text))return this.$emit("saving-duplicate",e)}this.hasForbiddingAddRule(e.tiClasses)||(this.$set(this.tagsCopy,t,e),this.toggleEditMode(t),this._events["update:tags"]&&this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},tagsEqual:function(){var t=this;return!this.tagsCopy.some(function(e,n){return!o()(e,t.tags[n])})},updateNewTag:function(t){var e=t.target.value;this.newTag=e,this.$emit("input",e)},initTags:function(){this.tagsCopy=u(this.tags,this.validation,this.isDuplicate),this.tagsEditStatus=a(this.tags).map(function(){return!1}),this._events["update:tags"]&&!this.tagsEqual()&&this.$emit("update:tags",this.tagsCopy)},blurredOnClick:function(t){this.$el.contains(t.target)||this.$el.contains(document.activeElement)||this.performBlur(t)},performBlur:function(){this.addOnBlur&&this.focused&&this.performAddTags(this.newTag),this.focused=!1}},watch:{value:function(t){this.addOnlyFromAutocomplete||(this.selectedItem=null),this.newTag=t},tags:{handler:function(){this.initTags()},deep:!0},autocompleteOpen:"selectDefaultItem"},created:function(){this.newTag=this.value,this.initTags()},mounted:function(){this.selectDefaultItem(),document.addEventListener("click",this.blurredOnClick)},destroyed:function(){document.removeEventListener("click",this.blurredOnClick)}},_=(n(9),d(A,r,[],!1,null,"61d92e31",null));_.options.__file="vue-tags-input/vue-tags-input.vue";var b=_.exports;n.d(e,"VueTagsInput",function(){return b}),n.d(e,"createClasses",function(){return s}),n.d(e,"createTag",function(){return c}),n.d(e,"createTags",function(){return u}),n.d(e,"TagInput",function(){return h}),b.install=function(t){return t.component(b.name,b)},"undefined"!=typeof window&&window.Vue&&window.Vue.use(b),e.default=b}])},function(t,e,n){t.exports=n(50)},function(t,e,n){window._=n(19);try{window.$=window.jQuery=n(21),n(22)}catch(t){}window.axios=n(9),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var r=document.head.querySelector('meta[name="csrf-token"]');r?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=r.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token")},function(t,e,n){(function(t,r){var i;(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",d=1,p=2,h=4,v=1,m=2,g=1,y=2,A=4,_=8,b=16,w=32,x=64,C=128,T=256,k=512,E=30,$="...",S=800,B=16,D=1,O=2,I=1/0,N=9007199254740991,j=17976931348623157e292,P=NaN,R=4294967295,L=R-1,M=R>>>1,F=[["ary",C],["bind",g],["bindKey",y],["curry",_],["curryRight",b],["flip",k],["partial",w],["partialRight",x],["rearg",T]],U="[object Arguments]",H="[object Array]",z="[object AsyncFunction]",q="[object Boolean]",W="[object Date]",V="[object DOMException]",Q="[object Error]",Y="[object Function]",G="[object GeneratorFunction]",K="[object Map]",J="[object Number]",Z="[object Null]",X="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ft="[object Float64Array]",dt="[object Int8Array]",pt="[object Int16Array]",ht="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",At=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,bt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,Ct=RegExp(wt.source),Tt=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,$t=/<%=([\s\S]+?)%>/g,St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/[\\^$.*+?()[\]{}|]/g,It=RegExp(Ot.source),Nt=/^\s+|\s+$/g,jt=/^\s+/,Pt=/\s+$/,Rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Lt=/\{\n\/\* \[wrapped with (.+)\] \*/,Mt=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ut=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,Qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Zt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Xt+"]",ne="["+Zt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Xt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ce="[^\\ud800-\\udfff]",ue="(?:\\ud83c[\\udde6-\\uddff]){2}",le="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",de="(?:"+oe+"|"+ae+")",pe="(?:"+fe+"|"+ae+")",he="(?:"+ne+"|"+se+")"+"?",ve="[\\ufe0e\\ufe0f]?"+he+("(?:\\u200d(?:"+[ce,ue,le].join("|")+")[\\ufe0e\\ufe0f]?"+he+")*"),me="(?:"+[ie,ue,le].join("|")+")"+ve,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("['’]","g"),Ae=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+ve,"g"),be=RegExp([fe+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,fe,"$"].join("|")+")",pe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,fe+de,"$"].join("|")+")",fe+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,me].join("|"),"g"),we=RegExp("[\\u200d\\ud800-\\udfff"+Zt+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ce=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Te=-1,ke={};ke[lt]=ke[ft]=ke[dt]=ke[pt]=ke[ht]=ke[vt]=ke[mt]=ke[gt]=ke[yt]=!0,ke[U]=ke[H]=ke[ct]=ke[q]=ke[ut]=ke[W]=ke[Q]=ke[Y]=ke[K]=ke[J]=ke[X]=ke[et]=ke[nt]=ke[rt]=ke[at]=!1;var Ee={};Ee[U]=Ee[H]=Ee[ct]=Ee[ut]=Ee[q]=Ee[W]=Ee[lt]=Ee[ft]=Ee[dt]=Ee[pt]=Ee[ht]=Ee[K]=Ee[J]=Ee[X]=Ee[et]=Ee[nt]=Ee[rt]=Ee[it]=Ee[vt]=Ee[mt]=Ee[gt]=Ee[yt]=!0,Ee[Q]=Ee[Y]=Ee[at]=!1;var $e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Se=parseFloat,Be=parseInt,De="object"==typeof t&&t&&t.Object===Object&&t,Oe="object"==typeof self&&self&&self.Object===Object&&self,Ie=De||Oe||Function("return this")(),Ne=e&&!e.nodeType&&e,je=Ne&&"object"==typeof r&&r&&!r.nodeType&&r,Pe=je&&je.exports===Ne,Re=Pe&&De.process,Le=function(){try{var t=je&&je.require&&je.require("util").types;return t||Re&&Re.binding&&Re.binding("util")}catch(t){}}(),Me=Le&&Le.isArrayBuffer,Fe=Le&&Le.isDate,Ue=Le&&Le.isMap,He=Le&&Le.isRegExp,ze=Le&&Le.isSet,qe=Le&&Le.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ve(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Ze(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function bn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=pn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n",ſ:"s"}),xn=pn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Cn(t){return"\\"+$e[t]}function Tn(t){return we.test(t)}function kn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function En(t,e){return function(n){return t(e(n))}}function $n(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var Nn=function t(e){var n,r=(e=null==e?Ie:Nn.defaults(Ie.Object(),e,Nn.pick(Ie,Ce))).Array,i=e.Date,Zt=e.Error,Xt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=Xt.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,fe=0,de=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pe=se.toString,he=ue.call(ee),ve=Ie._,me=ne("^"+ue.call(le).replace(Ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ge=Pe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,$e=ge?ge.allocUnsafe:o,De=En(ee.getPrototypeOf,ee),Oe=ee.create,Ne=se.propertyIsEnumerable,je=oe.splice,Re=_e?_e.isConcatSpreadable:o,Le=_e?_e.iterator:o,on=_e?_e.toStringTag:o,pn=function(){try{var t=Mo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),jn=e.clearTimeout!==Ie.clearTimeout&&e.clearTimeout,Pn=i&&i.now!==Ie.Date.now&&i.now,Rn=e.setTimeout!==Ie.setTimeout&&e.setTimeout,Ln=te.ceil,Mn=te.floor,Fn=ee.getOwnPropertySymbols,Un=ge?ge.isBuffer:o,Hn=e.isFinite,zn=oe.join,qn=En(ee.keys,ee),Wn=te.max,Vn=te.min,Qn=i.now,Yn=e.parseInt,Gn=te.random,Kn=oe.reverse,Jn=Mo(e,"DataView"),Zn=Mo(e,"Map"),Xn=Mo(e,"Promise"),tr=Mo(e,"Set"),er=Mo(e,"WeakMap"),nr=Mo(ee,"create"),rr=er&&new er,ir={},or=fa(Jn),ar=fa(Zn),sr=fa(Xn),cr=fa(tr),ur=fa(er),lr=_e?_e.prototype:o,fr=lr?lr.valueOf:o,dr=lr?lr.toString:o;function pr(t){if($s(t)&&!gs(t)&&!(t instanceof gr)){if(t instanceof mr)return t;if(le.call(t,"__wrapped__"))return da(t)}return new mr(t)}var hr=function(){function t(){}return function(e){if(!Es(e))return{};if(Oe)return Oe(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function mr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=R,this.__views__=[]}function yr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function jr(t,e,n,r,i,a){var s,c=e&d,u=e&p,l=e&h;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!Es(t))return t;var f=gs(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!c)return no(t,s)}else{var v=Ho(t),m=v==Y||v==G;if(bs(t))return Ki(t,c);if(v==X||v==U||m&&!i){if(s=u||m?{}:qo(t),!c)return u?function(t,e){return ro(t,Uo(t),e)}(t,function(t,e){return t&&ro(e,oc(e),t)}(s,t)):function(t,e){return ro(t,Fo(t),e)}(t,Dr(s,t))}else{if(!Ee[v])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case ct:return Ji(t);case q:case W:return new r(+t);case ut:return function(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ft:case dt:case pt:case ht:case vt:case mt:case gt:case yt:return Zi(t,n);case K:return new r;case J:case rt:return new r(t);case et:return function(t){var e=new t.constructor(t.source,zt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case nt:return new r;case it:return i=t,fr?ee(fr.call(i)):{}}var i}(t,v,c)}}a||(a=new wr);var g=a.get(t);if(g)return g;a.set(t,s),Is(t)?t.forEach(function(r){s.add(jr(r,e,n,r,t,a))}):Ss(t)&&t.forEach(function(r,i){s.set(i,jr(r,e,n,i,t,a))});var y=f?o:(l?u?Oo:Do:u?oc:ic)(t);return Qe(y||t,function(r,i){y&&(r=t[i=r]),$r(s,i,jr(r,e,n,i,t,a))}),s}function Pr(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Rr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Lr(t,e,n,r){var i=-1,o=Je,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=Xe(e,gn(n))),r?(o=Ze,s=!1):e.length>=a&&(o=An,s=!1,e=new br(e));t:for(;++i-1},Ar.prototype.set=function(t,e){var n=this.__data__,r=Sr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},_r.prototype.clear=function(){this.size=0,this.__data__={hash:new yr,map:new(Zn||Ar),string:new yr}},_r.prototype.delete=function(t){var e=Ro(this,t).delete(t);return this.size-=e?1:0,e},_r.prototype.get=function(t){return Ro(this,t).get(t)},_r.prototype.has=function(t){return Ro(this,t).has(t)},_r.prototype.set=function(t,e){var n=Ro(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},br.prototype.add=br.prototype.push=function(t){return this.__data__.set(t,u),this},br.prototype.has=function(t){return this.__data__.has(t)},wr.prototype.clear=function(){this.__data__=new Ar,this.size=0},wr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},wr.prototype.get=function(t){return this.__data__.get(t)},wr.prototype.has=function(t){return this.__data__.has(t)},wr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ar){var r=n.__data__;if(!Zn||r.length0&&n(s)?e>1?qr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Wr=so(),Vr=so(!0);function Qr(t,e){return t&&Wr(t,e,ic)}function Yr(t,e){return t&&Vr(t,e,ic)}function Gr(t,e){return Ke(e,function(e){return Cs(t[e])})}function Kr(t,e){for(var n=0,r=(e=Vi(e,t)).length;null!=t&&ne}function ti(t,e){return null!=t&&le.call(t,e)}function ei(t,e){return null!=t&&e in ee(t)}function ni(t,e,n){for(var i=n?Ze:Je,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,f=[];c--;){var d=t[c];c&&e&&(d=Xe(d,gn(e))),l=Vn(d.length,l),u[c]=!n&&(e||a>=120&&d.length>=120)?new br(c&&d):o}d=t[0];var p=-1,h=u[0];t:for(;++p=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function yi(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&je.call(s,c,1),je.call(t,c,1);return t}function _i(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Vo(i)?je.call(t,i,1):Li(t,i)}}return t}function bi(t,e){return t+Mn(Gn()*(e-t+1))}function wi(t,e){var n="";if(!t||e<1||e>N)return n;do{e%2&&(n+=t),(e=Mn(e/2))&&(t+=t)}while(e);return n}function xi(t,e){return oa(ta(t,e,Bc),t+"")}function Ci(t){return Cr(pc(t))}function Ti(t,e){var n=pc(t);return ca(n,Nr(e,0,n.length))}function ki(t,e,n,r){if(!Es(t))return t;for(var i=-1,a=(e=Vi(e,t)).length,s=a-1,c=t;null!=c&&++io?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i>>1,a=t[o];null!==a&&!js(a)&&(n?a<=e:a=a){var l=e?null:xo(t);if(l)return Sn(l);s=!1,i=An,u=new br}else u=e?[]:c;t:for(;++r=r?t:Bi(t,e,n)}var Gi=jn||function(t){return Ie.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=$e?$e(n):new t.constructor(n);return t.copy(r),r}function Ji(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function Zi(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Xi(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=js(t),s=e!==o,c=null===e,u=e==e,l=js(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Qo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r-1?i[a?e[s]:s]:o}}function po(t){return Bo(function(e){var n=e.length,r=n,i=mr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==No(a))var s=new mr([],!0)}for(r=s?r:n;++r1&&_.reverse(),d&&lc))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,d=!0,p=n&m?new br:o;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Rt,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Qe(F,function(n){var r="_."+n[0];e&n[1]&&!Je(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Lt);return e?e[1].split(Mt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Qn(),i=B-(r-n);if(n=r,i>0){if(++e>=S)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,Oa(t,n)});function Ma(t){var e=pr(t);return e.__chain__=!0,e}function Fa(t,e){return e(t)}var Ua=Bo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof gr&&Vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Fa,args:[i],thisArg:o}),new mr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ha=io(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var za=fo(ma),qa=fo(ga);function Wa(t,e){return(gs(t)?Qe:Mr)(t,Po(e,3))}function Va(t,e){return(gs(t)?Ye:Fr)(t,Po(e,3))}var Qa=io(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=xi(function(t,e,n){var i=-1,o="function"==typeof e,a=As(t)?r(t.length):[];return Mr(t,function(t){a[++i]=o?We(e,t,n):ri(t,e,n)}),a}),Ga=io(function(t,e,n){Or(t,n,e)});function Ka(t,e){return(gs(t)?Xe:di)(t,Po(e,3))}var Ja=io(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Za=xi(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Qo(t,e[0],e[1])?e=[]:n>2&&Qo(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,qr(e,1),[])}),Xa=Pn||function(){return Ie.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,To(t,C,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=Us(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=xi(function(t,e,n){var r=g;if(n.length){var i=$n(n,jo(ns));r|=w}return To(t,r,e,n,i)}),rs=xi(function(t,e,n){var r=g|y;if(n.length){var i=$n(n,jo(rs));r|=w}return To(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof t)throw new ie(c);function v(e){var n=r,a=i;return r=i=o,f=e,s=t.apply(a,n)}function m(t){var n=t-l;return l===o||n>=e||n<0||p&&t-f>=a}function g(){var t=Xa();if(m(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return p?Vn(n,a-(t-f)):n}(t))}function y(t){return u=o,h&&r?v(t):(r=i=o,s)}function A(){var t=Xa(),n=m(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return f=t,u=ia(g,e),d?v(t):s}(l);if(p)return Gi(u),u=ia(g,e),v(l)}return u===o&&(u=ia(g,e)),s}return e=zs(e)||0,Es(n)&&(d=!!n.leading,a=(p="maxWait"in n)?Wn(zs(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),A.cancel=function(){u!==o&&Gi(u),f=0,r=l=i=u=o},A.flush=function(){return u===o?s:y(Xa())},A}var os=xi(function(t,e){return Rr(t,1,e)}),as=xi(function(t,e,n){return Rr(t,zs(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||_r),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=_r;var us=Qi(function(t,e){var n=(e=1==e.length&&gs(e[0])?Xe(e[0],gn(Po())):Xe(qr(e,1),gn(Po()))).length;return xi(function(r){for(var i=-1,o=Vn(r.length,n);++i=e}),ms=ii(function(){return arguments}())?ii:function(t){return $s(t)&&le.call(t,"callee")&&!Ne.call(t,"callee")},gs=r.isArray,ys=Me?gn(Me):function(t){return $s(t)&&Zr(t)==ct};function As(t){return null!=t&&ks(t.length)&&!Cs(t)}function _s(t){return $s(t)&&As(t)}var bs=Un||zc,ws=Fe?gn(Fe):function(t){return $s(t)&&Zr(t)==W};function xs(t){if(!$s(t))return!1;var e=Zr(t);return e==Q||e==V||"string"==typeof t.message&&"string"==typeof t.name&&!Ds(t)}function Cs(t){if(!Es(t))return!1;var e=Zr(t);return e==Y||e==G||e==z||e==tt}function Ts(t){return"number"==typeof t&&t==Us(t)}function ks(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=N}function Es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function $s(t){return null!=t&&"object"==typeof t}var Ss=Ue?gn(Ue):function(t){return $s(t)&&Ho(t)==K};function Bs(t){return"number"==typeof t||$s(t)&&Zr(t)==J}function Ds(t){if(!$s(t)||Zr(t)!=X)return!1;var e=De(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==he}var Os=He?gn(He):function(t){return $s(t)&&Zr(t)==et};var Is=ze?gn(ze):function(t){return $s(t)&&Ho(t)==nt};function Ns(t){return"string"==typeof t||!gs(t)&&$s(t)&&Zr(t)==rt}function js(t){return"symbol"==typeof t||$s(t)&&Zr(t)==it}var Ps=qe?gn(qe):function(t){return $s(t)&&ks(t.length)&&!!ke[Zr(t)]};var Rs=_o(fi),Ls=_o(function(t,e){return t<=e});function Ms(t){if(!t)return[];if(As(t))return Ns(t)?On(t):no(t);if(Le&&t[Le])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Le]());var e=Ho(t);return(e==K?kn:e==nt?Sn:pc)(t)}function Fs(t){return t?(t=zs(t))===I||t===-I?(t<0?-1:1)*j:t==t?t:0:0===t?t:0}function Us(t){var e=Fs(t),n=e%1;return e==e?n?e-n:e:0}function Hs(t){return t?Nr(Us(t),0,R):0}function zs(t){if("number"==typeof t)return t;if(js(t))return P;if(Es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Nt,"");var n=Wt.test(t);return n||Qt.test(t)?Be(t.slice(2),n?2:8):qt.test(t)?P:+t}function qs(t){return ro(t,oc(t))}function Ws(t){return null==t?"":Pi(t)}var Vs=oo(function(t,e){if(Jo(e)||As(e))ro(e,ic(e),t);else for(var n in e)le.call(e,n)&&$r(t,n,e[n])}),Qs=oo(function(t,e){ro(e,oc(e),t)}),Ys=oo(function(t,e,n,r){ro(e,oc(e),t,r)}),Gs=oo(function(t,e,n,r){ro(e,ic(e),t,r)}),Ks=Bo(Ir);var Js=xi(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Qo(e[0],e[1],i)&&(r=1);++n1),e}),ro(t,Oo(t),n),r&&(n=jr(n,d|p|h,$o));for(var i=e.length;i--;)Li(n,e[i]);return n});var uc=Bo(function(t,e){return null==t?{}:function(t,e){return yi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=Xe(Oo(t),function(t){return[t]});return e=Po(e),yi(t,n,function(t,n){return e(t,n[0])})}var fc=Co(ic),dc=Co(oc);function pc(t){return null==t?[]:yn(t,ic(t))}var hc=uo(function(t,e,n){return e=e.toLowerCase(),t+(n?vc(e):e)});function vc(t){return xc(Ws(t).toLowerCase())}function mc(t){return(t=Ws(t))&&t.replace(Gt,wn).replace(Ae,"")}var gc=uo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=uo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Ac=co("toLowerCase");var _c=uo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var bc=uo(function(t,e,n){return t+(n?" ":"")+xc(e)});var wc=uo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),xc=co("toUpperCase");function Cc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return xe.test(t)}(t)?function(t){return t.match(be)||[]}(t):function(t){return t.match(Ft)||[]}(t):t.match(e)||[]}var Tc=xi(function(t,e){try{return We(t,o,e)}catch(t){return xs(t)?t:new Zt(t)}}),kc=Bo(function(t,e){return Qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ec(t){return function(){return t}}var $c=po(),Sc=po(!0);function Bc(t){return t}function Dc(t){return ci("function"==typeof t?t:jr(t,d))}var Oc=xi(function(t,e){return function(n){return ri(n,t,e)}}),Ic=xi(function(t,e){return function(n){return ri(t,n,e)}});function Nc(t,e,n){var r=ic(e),i=Gr(e,r);null!=n||Es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Gr(e,ic(e)));var o=!(Es(n)&&"chain"in n&&!n.chain),a=Cs(t);return Qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=no(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function jc(){}var Pc=go(Xe),Rc=go(Ge),Lc=go(rn);function Mc(t){return Yo(t)?dn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var Fc=Ao(),Uc=Ao(!0);function Hc(){return[]}function zc(){return!1}var qc=mo(function(t,e){return t+e},0),Wc=wo("ceil"),Vc=mo(function(t,e){return t/e},1),Qc=wo("floor");var Yc,Gc=mo(function(t,e){return t*e},1),Kc=wo("round"),Jc=mo(function(t,e){return t-e},0);return pr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=Us(t),function(){if(--t<1)return e.apply(this,arguments)}},pr.ary=ts,pr.assign=Vs,pr.assignIn=Qs,pr.assignInWith=Ys,pr.assignWith=Gs,pr.at=Ks,pr.before=es,pr.bind=ns,pr.bindAll=kc,pr.bindKey=rs,pr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},pr.chain=Ma,pr.chunk=function(t,e,n){e=(n?Qo(t,e,n):e===o)?1:Wn(Us(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Ln(i/e));ai?0:i+n),(r=r===o||r>i?i:Us(r))<0&&(r+=i),r=n>r?0:Hs(r);n>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Os(e))&&!(e=Pi(e))&&Tn(t)?Yi(On(t),0,n):t.split(e,n):[]},pr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Wn(Us(e),0),xi(function(n){var r=n[e],i=Yi(n,0,e);return r&&tn(i,r),We(t,this,i)})},pr.tail=function(t){var e=null==t?0:t.length;return e?Bi(t,1,e):[]},pr.take=function(t,e,n){return t&&t.length?Bi(t,0,(e=n||e===o?1:Us(e))<0?0:e):[]},pr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Bi(t,(e=r-(e=n||e===o?1:Us(e)))<0?0:e,r):[]},pr.takeRightWhile=function(t,e){return t&&t.length?Fi(t,Po(e,3),!1,!0):[]},pr.takeWhile=function(t,e){return t&&t.length?Fi(t,Po(e,3)):[]},pr.tap=function(t,e){return e(t),t},pr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return Es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},pr.thru=Fa,pr.toArray=Ms,pr.toPairs=fc,pr.toPairsIn=dc,pr.toPath=function(t){return gs(t)?Xe(t,la):js(t)?[t]:no(ua(Ws(t)))},pr.toPlainObject=qs,pr.transform=function(t,e,n){var r=gs(t),i=r||bs(t)||Ps(t);if(e=Po(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Es(t)&&Cs(o)?hr(De(t)):{}}return(i?Qe:Qr)(t,function(t,r,i){return e(n,t,r,i)}),n},pr.unary=function(t){return ts(t,1)},pr.union=$a,pr.unionBy=Sa,pr.unionWith=Ba,pr.uniq=function(t){return t&&t.length?Ri(t):[]},pr.uniqBy=function(t,e){return t&&t.length?Ri(t,Po(e,2)):[]},pr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Ri(t,o,e):[]},pr.unset=function(t,e){return null==t||Li(t,e)},pr.unzip=Da,pr.unzipWith=Oa,pr.update=function(t,e,n){return null==t?t:Mi(t,e,Wi(n))},pr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Mi(t,e,Wi(n),r)},pr.values=pc,pr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},pr.without=Ia,pr.words=Cc,pr.wrap=function(t,e){return ls(Wi(e),t)},pr.xor=Na,pr.xorBy=ja,pr.xorWith=Pa,pr.zip=Ra,pr.zipObject=function(t,e){return zi(t||[],e||[],$r)},pr.zipObjectDeep=function(t,e){return zi(t||[],e||[],ki)},pr.zipWith=La,pr.entries=fc,pr.entriesIn=dc,pr.extend=Qs,pr.extendWith=Ys,Nc(pr,pr),pr.add=qc,pr.attempt=Tc,pr.camelCase=hc,pr.capitalize=vc,pr.ceil=Wc,pr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=zs(n))==n?n:0),e!==o&&(e=(e=zs(e))==e?e:0),Nr(zs(t),e,n)},pr.clone=function(t){return jr(t,h)},pr.cloneDeep=function(t){return jr(t,d|h)},pr.cloneDeepWith=function(t,e){return jr(t,d|h,e="function"==typeof e?e:o)},pr.cloneWith=function(t,e){return jr(t,h,e="function"==typeof e?e:o)},pr.conformsTo=function(t,e){return null==e||Pr(t,e,ic(e))},pr.deburr=mc,pr.defaultTo=function(t,e){return null==t||t!=t?e:t},pr.divide=Vc,pr.endsWith=function(t,e,n){t=Ws(t),e=Pi(e);var r=t.length,i=n=n===o?r:Nr(Us(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},pr.eq=ps,pr.escape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(xt,xn):t},pr.escapeRegExp=function(t){return(t=Ws(t))&&It.test(t)?t.replace(Ot,"\\$&"):t},pr.every=function(t,e,n){var r=gs(t)?Ge:Ur;return n&&Qo(t,e,n)&&(e=o),r(t,Po(e,3))},pr.find=za,pr.findIndex=ma,pr.findKey=function(t,e){return an(t,Po(e,3),Qr)},pr.findLast=qa,pr.findLastIndex=ga,pr.findLastKey=function(t,e){return an(t,Po(e,3),Yr)},pr.floor=Qc,pr.forEach=Wa,pr.forEachRight=Va,pr.forIn=function(t,e){return null==t?t:Wr(t,Po(e,3),oc)},pr.forInRight=function(t,e){return null==t?t:Vr(t,Po(e,3),oc)},pr.forOwn=function(t,e){return t&&Qr(t,Po(e,3))},pr.forOwnRight=function(t,e){return t&&Yr(t,Po(e,3))},pr.get=Xs,pr.gt=hs,pr.gte=vs,pr.has=function(t,e){return null!=t&&zo(t,e,ti)},pr.hasIn=tc,pr.head=Aa,pr.identity=Bc,pr.includes=function(t,e,n,r){t=As(t)?t:pc(t),n=n&&!r?Us(n):0;var i=t.length;return n<0&&(n=Wn(i+n,0)),Ns(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},pr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Us(n);return i<0&&(i=Wn(r+i,0)),cn(t,e,i)},pr.inRange=function(t,e,n){return e=Fs(e),n===o?(n=e,e=0):n=Fs(n),function(t,e,n){return t>=Vn(e,n)&&t=-N&&t<=N},pr.isSet=Is,pr.isString=Ns,pr.isSymbol=js,pr.isTypedArray=Ps,pr.isUndefined=function(t){return t===o},pr.isWeakMap=function(t){return $s(t)&&Ho(t)==at},pr.isWeakSet=function(t){return $s(t)&&Zr(t)==st},pr.join=function(t,e){return null==t?"":zn.call(t,e)},pr.kebabCase=gc,pr.last=xa,pr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Us(n))<0?Wn(r+i,0):Vn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},pr.lowerCase=yc,pr.lowerFirst=Ac,pr.lt=Rs,pr.lte=Ls,pr.max=function(t){return t&&t.length?Hr(t,Bc,Xr):o},pr.maxBy=function(t,e){return t&&t.length?Hr(t,Po(e,2),Xr):o},pr.mean=function(t){return fn(t,Bc)},pr.meanBy=function(t,e){return fn(t,Po(e,2))},pr.min=function(t){return t&&t.length?Hr(t,Bc,fi):o},pr.minBy=function(t,e){return t&&t.length?Hr(t,Po(e,2),fi):o},pr.stubArray=Hc,pr.stubFalse=zc,pr.stubObject=function(){return{}},pr.stubString=function(){return""},pr.stubTrue=function(){return!0},pr.multiply=Gc,pr.nth=function(t,e){return t&&t.length?mi(t,Us(e)):o},pr.noConflict=function(){return Ie._===this&&(Ie._=ve),this},pr.noop=jc,pr.now=Xa,pr.pad=function(t,e,n){t=Ws(t);var r=(e=Us(e))?Dn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return yo(Mn(i),n)+t+yo(Ln(i),n)},pr.padEnd=function(t,e,n){t=Ws(t);var r=(e=Us(e))?Dn(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Gn();return Vn(t+i*(e-t+Se("1e-"+((i+"").length-1))),e)}return bi(t,e)},pr.reduce=function(t,e,n){var r=gs(t)?en:hn,i=arguments.length<3;return r(t,Po(e,4),n,i,Mr)},pr.reduceRight=function(t,e,n){var r=gs(t)?nn:hn,i=arguments.length<3;return r(t,Po(e,4),n,i,Fr)},pr.repeat=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:Us(e),wi(Ws(t),e)},pr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},pr.result=function(t,e,n){var r=-1,i=(e=Vi(e,t)).length;for(i||(i=1,t=o);++rN)return[];var n=R,r=Vn(t,R);e=Po(e),t-=R;for(var i=mn(r,e);++n=a)return t;var c=n-Dn(r);if(c<1)return r;var u=s?Yi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Os(i)){if(t.slice(c).search(i)){var l,f=u;for(i.global||(i=ne(i.source,Ws(zt.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var d=l.index;u=u.slice(0,d===o?c:d)}}else if(t.indexOf(Pi(i),c)!=c){var p=u.lastIndexOf(i);p>-1&&(u=u.slice(0,p))}return u+r},pr.unescape=function(t){return(t=Ws(t))&&Ct.test(t)?t.replace(wt,In):t},pr.uniqueId=function(t){var e=++fe;return Ws(t)+e},pr.upperCase=wc,pr.upperFirst=xc,pr.each=Wa,pr.eachRight=Va,pr.first=Aa,Nc(pr,(Yc={},Qr(pr,function(t,e){le.call(pr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),pr.VERSION="4.17.15",Qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){pr[t].placeholder=pr}),Qe(["drop","take"],function(t,e){gr.prototype[t]=function(n){n=n===o?1:Wn(Us(n),0);var r=this.__filtered__&&!e?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Vn(n,r.__takeCount__):r.__views__.push({size:Vn(n,R),type:t+(r.__dir__<0?"Right":"")}),r},gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==D||3==n;gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Po(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");gr.prototype[t]=function(){return this[n](1).value()[0]}}),Qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");gr.prototype[t]=function(){return this.__filtered__?new gr(this):this[n](1)}}),gr.prototype.compact=function(){return this.filter(Bc)},gr.prototype.find=function(t){return this.filter(t).head()},gr.prototype.findLast=function(t){return this.reverse().find(t)},gr.prototype.invokeMap=xi(function(t,e){return"function"==typeof t?new gr(this):this.map(function(n){return ri(n,t,e)})}),gr.prototype.reject=function(t){return this.filter(cs(Po(t)))},gr.prototype.slice=function(t,e){t=Us(t);var n=this;return n.__filtered__&&(t>0||e<0)?new gr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=Us(e))<0?n.dropRight(-e):n.take(e-t)),n)},gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gr.prototype.toArray=function(){return this.take(R)},Qr(gr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=pr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(pr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof gr,u=s[0],l=c||gs(e),f=function(t){var e=i.apply(pr,tn([t],s));return r&&d?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,v=c&&!p;if(!a&&l){e=v?e:new gr(this);var m=t.apply(e,s);return m.__actions__.push({func:Fa,args:[f],thisArg:o}),new mr(m,d)}return h&&v?t.apply(this,s):(m=this.thru(f),h?r?m.value()[0]:m.value():m)})}),Qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);pr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Qr(gr.prototype,function(t,e){var n=pr[e];if(n){var r=n.name+"";le.call(ir,r)||(ir[r]=[]),ir[r].push({name:e,func:n})}}),ir[ho(o,y).name]=[{name:"wrapper",func:o}],gr.prototype.clone=function(){var t=new gr(this.__wrapped__);return t.__actions__=no(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=no(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=no(this.__views__),t},gr.prototype.reverse=function(){if(this.__filtered__){var t=new gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},pr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=da(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},pr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gr){var e=t;return this.__actions__.length&&(e=new gr(this)),(e=e.reverse()).__actions__.push({func:Fa,args:[Ea],thisArg:o}),new mr(e,this.__chain__)}return this.thru(Ea)},pr.prototype.toJSON=pr.prototype.valueOf=pr.prototype.value=function(){return Ui(this.__wrapped__,this.__actions__)},pr.prototype.first=pr.prototype.head,Le&&(pr.prototype[Le]=function(){return this}),pr}();Ie._=Nn,(i=function(){return Nn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(2),n(20)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],a=n.document,s=Object.getPrototypeOf,c=o.slice,u=o.concat,l=o.push,f=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,v=h.toString,m=v.call(Object),g={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},A=function(t){return null!=t&&t===t.window},_={type:!0,src:!0,nonce:!0,noModule:!0};function b(t,e,n){var r,i,o=(n=n||a).createElement("script");if(o.text=t,e)for(r in _)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[p.call(t)]||"object":typeof t}var x=function(t,e){return new x.fn.init(t,e)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function T(t){var e=!!t&&"length"in t&&t.length,n=w(t);return!y(t)&&!A(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}x.fn=x.prototype={jquery:"3.4.1",constructor:x,length:0,toArray:function(){return c.call(this)},get:function(t){return null==t?c.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+R+")"+R+"*"),W=new RegExp(R+"|>"),V=new RegExp(F),Q=new RegExp("^"+L+"$"),Y={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),nt=function(t,e,n){var r="0x"+e-65536;return r!=r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){d()},at=_t(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{I.apply(B=N.call(b.childNodes),b.childNodes),B[b.childNodes.length].nodeType}catch(t){I={apply:B.length?function(t,e){O.apply(t,N.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,u,l,f,h,g,y=e&&e.ownerDocument,w=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return r;if(!i&&((e?e.ownerDocument||e:b)!==p&&d(e),e=e||p,v)){if(11!==w&&(f=X.exec(t)))if(o=f[1]){if(9===w){if(!(u=e.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(y&&(u=y.getElementById(o))&&A(e,u)&&u.id===o)return r.push(u),r}else{if(f[2])return I.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return I.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!E[t+" "]&&(!m||!m.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===w&&W.test(t)){for((l=e.getAttribute("id"))?l=l.replace(rt,it):e.setAttribute("id",l=_),s=(h=a(t)).length;s--;)h[s]="#"+l+" "+At(h[s]);g=h.join(","),y=tt.test(t)&>(e.parentNode)||e}try{return I.apply(r,y.querySelectorAll(g)),r}catch(e){E(t,!0)}finally{l===_&&e.removeAttribute("id")}}}return c(t.replace(H,"$1"),e,r,i)}function ct(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function ut(t){return t[_]=!0,t}function lt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function dt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ht(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function vt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ut(function(e){return e=+e,ut(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!G.test(e||n&&n.nodeName||"HTML")},d=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:b;return a!==p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!o(p),b!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=lt(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(p.getElementsByClassName),n.getById=lt(function(t){return h.appendChild(t).id=_,!p.getElementsByName||!p.getElementsByName(_).length}),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&v)return e.getElementsByClassName(t)},g=[],m=[],(n.qsa=Z.test(p.querySelectorAll))&&(lt(function(t){h.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+R+"*(?:value|"+P+")"),t.querySelectorAll("[id~="+_+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]")}),lt(function(t){t.innerHTML="";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Z.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&<(function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),g.push("!=",F)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),e=Z.test(h.compareDocumentPosition),A=e||Z.test(h.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},$=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t===p||t.ownerDocument===b&&A(b,t)?-1:e===p||e.ownerDocument===b&&A(b,e)?1:l?j(l,t)-j(l,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t===p?-1:e===p?1:i?-1:o?1:l?j(l,t)-j(l,e):0;if(i===o)return dt(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?dt(a[r],s[r]):a[r]===b?-1:s[r]===b?1:0},p):p},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),n.matchesSelector&&v&&!E[e+" "]&&(!g||!g.test(e))&&(!m||!m.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){E(e,!0)}return st(e,p,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),A(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var i=r.attrHandle[e.toLowerCase()],o=i&&S.call(r.attrHandle,e.toLowerCase())?i(t,e,!v):void 0;return void 0!==o?o:n.attributes||!v?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort($),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return l=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=st.selectors={cacheLength:50,createPseudo:ut,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&V.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&C(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,c){var u,l,f,d,p,h,v=o!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!c&&!s,A=!1;if(m){if(o){for(;v;){for(d=e;d=d[v];)if(s?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;h=v="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(A=(p=(u=(l=(f=(d=m)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===w&&u[1])&&u[2],d=p&&m.childNodes[p];d=++p&&d&&d[v]||(A=p=0)||h.pop();)if(1===d.nodeType&&++A&&d===e){l[t]=[w,p,A];break}}else if(y&&(A=p=(u=(l=(f=(d=e)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===w&&u[1]),!1===A)for(;(d=++p&&d&&d[v]||(A=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++A||(y&&((l=(f=d[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]=[w,A]),d!==e)););return(A-=i)===r||A%r==0&&A/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[_]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ut(function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=j(t,o[a])]=!(n[r]=o[a])}):function(t){return i(t,0,n)}):i}},pseudos:{not:ut(function(t){var e=[],n=[],r=s(t.replace(H,"$1"));return r[_]?ut(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:ut(function(t){return function(e){return st(t,e).length>0}}),contains:ut(function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}}),lang:ut(function(t){return Q.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=v?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===h},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:vt(!1),disabled:vt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:mt(function(){return[0]}),last:mt(function(t,e){return[e-1]}),eq:mt(function(t,e,n){return[n<0?n+e:n]}),even:mt(function(t,e){for(var n=0;ne?e:n;--r>=0;)t.push(r);return t}),gt:mt(function(t,e,n){for(var r=n<0?n+e:n;++r1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function wt(t,e,n,r,i){for(var o,a=[],s=0,c=t.length,u=null!=e;s-1&&(o[u]=!(a[u]=f))}}else g=wt(g===a?g.splice(h,g.length):g),i?i(null,a,g,c):I.apply(a,g)})}function Ct(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],c=a?1:0,l=_t(function(t){return t===e},s,!0),f=_t(function(t){return j(e,t)>-1},s,!0),d=[function(t,n,r){var i=!a&&(r||n!==u)||((e=n).nodeType?l(t,n,r):f(t,n,r));return e=null,i}];c1&&bt(d),c>1&&At(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(H,"$1"),n,c0,i=t.length>0,o=function(o,a,s,c,l){var f,h,m,g=0,y="0",A=o&&[],_=[],b=u,x=o||i&&r.find.TAG("*",l),C=w+=null==b?1:Math.random()||.1,T=x.length;for(l&&(u=a===p||a||l);y!==T&&null!=(f=x[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument===p||(d(f),s=!v);m=t[h++];)if(m(f,a||p,s)){c.push(f);break}l&&(w=C)}n&&((f=!m&&f)&&g--,o&&A.push(f))}if(g+=y,n&&y!==g){for(h=0;m=e[h++];)m(A,_,a,s);if(o){if(g>0)for(;y--;)A[y]||_[y]||(_[y]=D.call(c));_=wt(_)}I.apply(c,_),l&&!o&&_.length>0&&g+e.length>1&&st.uniqueSort(c)}return l&&(w=C,u=b),A};return n?ut(o):o}(o,i))).selector=t}return s},c=st.select=function(t,e,n,i){var o,c,u,l,f,d="function"==typeof t&&t,p=!i&&a(t=d.selector||t);if(n=n||[],1===p.length){if((c=p[0]=p[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===e.nodeType&&v&&r.relative[c[1].type]){if(!(e=(r.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(o=Y.needsContext.test(t)?0:c.length;o--&&(u=c[o],!r.relative[l=u.type]);)if((f=r.find[l])&&(i=f(u.matches[0].replace(et,nt),tt.test(c[0].type)&>(e.parentNode)||e))){if(c.splice(o,1),!(t=i.length&&At(c)))return I.apply(n,i),n;break}}return(d||s(t,p))(i,e,!v,n,!e||tt.test(t)&>(e.parentNode)||e),n},n.sortStable=_.split("").sort($).join("")===_,n.detectDuplicates=!!f,d(),n.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),lt(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ft("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&<(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ft("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ft(P,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),st}(n);x.find=k,x.expr=k.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=k.uniqueSort,x.text=k.getText,x.isXMLDoc=k.isXML,x.contains=k.contains,x.escapeSelector=k.escape;var E=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&x(t).is(n))break;r.push(t)}return r},$=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},S=x.expr.match.needsContext;function B(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,e,n){return y(e)?x.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?x.grep(t,function(t){return t===e!==n}):"string"!=typeof e?x.grep(t,function(t){return f.call(e,t)>-1!==n}):x.filter(e,t,n)}x.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?x.find.matchesSelector(r,t)?[r]:[]:x.find.matches(t,x.grep(e,function(t){return 1===t.nodeType}))},x.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(x(t).filter(function(){for(e=0;e1?x.uniqueSort(n):n},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&S.test(t)?x(t):t||[],!1).length}});var I,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||I,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:N.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof x?e[0]:e,x.merge(this,x.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:a,!0)),D.test(r[1])&&x.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,I=x(a);var j=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&x.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?x.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?f.call(x(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return E(t,"parentNode")},parentsUntil:function(t,e,n){return E(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return E(t,"nextSibling")},prevAll:function(t){return E(t,"previousSibling")},nextUntil:function(t,e,n){return E(t,"nextSibling",n)},prevUntil:function(t,e,n){return E(t,"previousSibling",n)},siblings:function(t){return $((t.parentNode||{}).firstChild,t)},children:function(t){return $(t.firstChild)},contents:function(t){return void 0!==t.contentDocument?t.contentDocument:(B(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},function(t,e){x.fn[t]=function(n,r){var i=x.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(P[t]||x.uniqueSort(i),j.test(t)&&i.reverse()),this.pushStack(i)}});var L=/[^\x20\t\r\n\f]+/g;function M(t){return t}function F(t){throw t}function U(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}x.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return x.each(t.match(L)||[],function(t,n){e[n]=!0}),e}(t):x.extend({},t);var e,n,r,i,o=[],a=[],s=-1,c=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?x.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},x.extend({Deferred:function(t){var e=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return x.Deferred(function(n){x.each(e,function(e,r){var i=y(t[r[4]])&&t[r[4]];o[r[1]](function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,r,i){var o=0;function a(t,e,r,i){return function(){var s=this,c=arguments,u=function(){var n,u;if(!(t=o&&(r!==F&&(s=void 0,c=[n]),e.rejectWith(s,c))}};t?l():(x.Deferred.getStackHook&&(l.stackTrace=x.Deferred.getStackHook()),n.setTimeout(l))}}return x.Deferred(function(n){e[0][3].add(a(0,n,y(i)?i:M,n.notifyWith)),e[1][3].add(a(0,n,y(t)?t:M)),e[2][3].add(a(0,n,y(r)?r:F))}).promise()},promise:function(t){return null!=t?x.extend(t,i):i}},o={};return x.each(e,function(t,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=c.call(arguments),o=x.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?c.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(U(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)U(i[n],a(n),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&H.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},x.readyException=function(t){n.setTimeout(function(){throw t})};var z=x.Deferred();function q(){a.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),x.ready()}x.fn.ready=function(t){return z.then(t).catch(function(t){x.readyException(t)}),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==t&&--x.readyWait>0||z.resolveWith(a,[x]))}}),x.ready.then=z.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(x.ready):(a.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var W=function(t,e,n,r,i,o,a){var s=0,c=t.length,u=null==n;if("object"===w(n))for(s in i=!0,n)W(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),u&&(a?(e.call(t,r),e=null):(u=e,e=function(t,e,n){return u.call(x(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){X.remove(this,t)})}}),x.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Z.get(t,e),n&&(!r||Array.isArray(n)?r=Z.access(t,e,x.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=x.queue(t,e),r=n.length,i=n.shift(),o=x._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){x.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Z.get(t,n)||Z.access(t,n,{empty:x.Callbacks("once memory").add(function(){Z.remove(t,[e+"queue",n])})})}}),x.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i,yt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function At(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&B(t,e)?x.merge([t],n):n}function _t(t,e){for(var n=0,r=t.length;n-1)i&&i.push(o);else if(u=st(o),a=At(f.appendChild(o),"script"),u&&_t(a),n)for(l=0;o=a[l++];)gt.test(o.type||"")&&n.push(o);return f}bt=a.createDocumentFragment().appendChild(a.createElement("div")),(wt=a.createElement("input")).setAttribute("type","radio"),wt.setAttribute("checked","checked"),wt.setAttribute("name","t"),bt.appendChild(wt),g.checkClone=bt.cloneNode(!0).cloneNode(!0).lastChild.checked,bt.innerHTML="",g.noCloneChecked=!!bt.cloneNode(!0).lastChild.defaultValue;var Tt=/^key/,kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Et=/^([^.]*)(?:\.(.+)|)/;function $t(){return!0}function St(){return!1}function Bt(t,e){return t===function(){try{return a.activeElement}catch(t){}}()==("focus"===e)}function Dt(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)Dt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=St;else if(!i)return t;return 1===o&&(a=i,(i=function(t){return x().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=x.guid++)),t.each(function(){x.event.add(this,e,i,r,n)})}function Ot(t,e,n){n?(Z.set(t,e,!1),x.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Z.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(x.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=c.call(arguments),Z.set(this,e,o),r=n(this,e),this[e](),o!==(i=Z.get(this,e))||r?Z.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else o.length&&(Z.set(this,e,{value:x.event.trigger(x.extend(o[0],x.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Z.get(t,e)&&x.event.add(t,e,$t)}x.event={global:{},add:function(t,e,n,r,i){var o,a,s,c,u,l,f,d,p,h,v,m=Z.get(t);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&x.find.matchesSelector(at,i),n.guid||(n.guid=x.guid++),(c=m.events)||(c=m.events={}),(a=m.handle)||(a=m.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(L)||[""]).length;u--;)p=v=(s=Et.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=x.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=x.event.special[p]||{},l=x.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&x.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=c[p])||((d=c[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),x.event.global[p]=!0)},remove:function(t,e,n,r,i){var o,a,s,c,u,l,f,d,p,h,v,m=Z.hasData(t)&&Z.get(t);if(m&&(c=m.events)){for(u=(e=(e||"").match(L)||[""]).length;u--;)if(p=v=(s=Et.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p){for(f=x.event.special[p]||{},d=c[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)l=d[o],!i&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(t,l));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,h,m.handle)||x.removeEvent(t,p,m.handle),delete c[p])}else for(p in c)x.event.remove(t,p+e[u],n,r,!0);x.isEmptyObject(c)&&Z.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=x.event.fix(t),c=new Array(arguments.length),u=(Z.get(this,"events")||{})[s.type]||[],l=x.event.special[s.type]||{};for(c[0]=s,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],a={},n=0;n-1:x.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,c\x20\t\r\n\f]*)[^>]*)\/>/gi,Nt=/\s*$/g;function Rt(t,e){return B(t,"table")&&B(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function Lt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Mt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var n,r,i,o,a,s,c,u;if(1===e.nodeType){if(Z.hasData(t)&&(o=Z.access(t),a=Z.set(e,o),u=o.events))for(i in delete a.handle,a.events={},u)for(n=0,r=u[i].length;n1&&"string"==typeof h&&!g.checkClone&&jt.test(h))return t.each(function(i){var o=t.eq(i);v&&(e[0]=h.call(this,i,o.html())),Ht(o,e,n,r)});if(d&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=x.map(At(i,"script"),Lt)).length;f")},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),c=st(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(a=At(s),r=0,i=(o=At(t)).length;r0&&_t(a,!c&&At(t,"script")),s},cleanData:function(t){for(var e,n,r,i=x.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[Z.expando]){if(e.events)for(r in e.events)i[r]?x.event.remove(n,r):x.removeEvent(n,r,e.handle);n[Z.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),x.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return W(this,function(t){return void 0===t?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Ht(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,t).appendChild(t)})},prepend:function(){return Ht(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Rt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Ht(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Ht(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(At(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return x.clone(this,t,e)})},html:function(t){return W(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Nt.test(t)&&!yt[(mt.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;n=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-c-s-.5))||0),c}function oe(t,e,n){var r=Wt(t),i=(!g.boxSizingReliable()||n)&&"border-box"===x.css(t,"boxSizing",!1,r),o=i,a=Qt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(qt.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===x.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===x.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ie(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ae(t,e,n,r,i){return new ae.prototype.init(t,e,n,r,i)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=G(e),c=te.test(e),u=t.style;if(c||(e=Zt(s)),a=x.cssHooks[e]||x.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:u[e];"string"===(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=ft(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||c||(n+=i&&i[3]||(x.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(c?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,r){var i,o,a,s=G(e);return te.test(e)||(e=Zt(s)),(a=x.cssHooks[e]||x.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Qt(t,e,r)),"normal"===i&&e in ne&&(i=ne[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),x.each(["height","width"],function(t,e){x.cssHooks[e]={get:function(t,n,r){if(n)return!Xt.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?oe(t,e,r):lt(t,ee,function(){return oe(t,e,r)})},set:function(t,n,r){var i,o=Wt(t),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===x.css(t,"boxSizing",!1,o),c=r?ie(t,e,r,s,o):0;return s&&a&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ie(t,e,"border",!1,o)-.5)),c&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=x.css(t,e)),re(0,n,c)}}}),x.cssHooks.marginLeft=Yt(g.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Qt(t,"marginLeft"))||t.getBoundingClientRect().left-lt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(t,e){x.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(x.cssHooks[t+e].set=re)}),x.fn.extend({css:function(t,e){return W(this,function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Wt(t),i=e.length;a1)}}),x.Tween=ae,ae.prototype={constructor:ae,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var t=ae.propHooks[this.prop];return t&&t.get?t.get(this):ae.propHooks._default.get(this)},run:function(t){var e,n=ae.propHooks[this.prop];return this.options.duration?this.pos=e=x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ae.propHooks._default.set(this),this}},ae.prototype.init.prototype=ae.prototype,ae.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||!x.cssHooks[t.prop]&&null==t.elem.style[Zt(t.prop)]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},ae.propHooks.scrollTop=ae.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=ae.prototype.init,x.fx.step={};var se,ce,ue=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function fe(){ce&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(fe):n.setTimeout(fe,x.fx.interval),x.fx.tick())}function de(){return n.setTimeout(function(){se=void 0}),se=Date.now()}function pe(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function he(t,e,n){for(var r,i=(ve.tweeners[e]||[]).concat(ve.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(t){return this.each(function(){x.removeAttr(this,t)})}}),x.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?x.prop(t,e,n):(1===o&&x.isXMLDoc(t)||(i=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?me:void 0)),void 0!==n?null===n?void x.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=x.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&B(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(L);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),me={set:function(t,e,n){return!1===e?x.removeAttr(t,n):t.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ge[e]||x.find.attr;ge[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ge[a],ge[a]=i,i=null!=n(t,e,r)?a:null,ge[a]=o),i}});var ye=/^(?:input|select|textarea|button)$/i,Ae=/^(?:a|area)$/i;function _e(t){return(t.match(L)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}x.fn.extend({prop:function(t,e){return W(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[x.propFix[t]||t]})}}),x.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&x.isXMLDoc(t)||(e=x.propFix[e]||e,i=x.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||Ae.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(x.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,c=0;if(y(t))return this.each(function(e){x(this).addClass(t.call(this,e,be(this)))});if((e=we(t)).length)for(;n=this[c++];)if(i=be(n),r=1===n.nodeType&&" "+_e(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=_e(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,c=0;if(y(t))return this.each(function(e){x(this).removeClass(t.call(this,e,be(this)))});if(!arguments.length)return this.attr("class","");if((e=we(t)).length)for(;n=this[c++];)if(i=be(n),r=1===n.nodeType&&" "+_e(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=_e(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):y(t)?this.each(function(n){x(this).toggleClass(t.call(this,n,be(this),e),e)}):this.each(function(){var e,i,o,a;if(r)for(i=0,o=x(this),a=we(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=be(this))&&Z.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Z.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+_e(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;x.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,x(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=x.map(i,function(t){return null==t?"":t+""})),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xe,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:_e(x.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],c=a?o+1:i.length;for(r=o<0?c:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},g.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),g.focusin="onfocusin"in n;var Ce=/^(?:focusinfocus|focusoutblur)$/,Te=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(t,e,r,i){var o,s,c,u,l,f,d,p,v=[r||a],m=h.call(t,"type")?t.type:t,g=h.call(t,"namespace")?t.namespace.split("."):[];if(s=p=c=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!Ce.test(m+x.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[x.expando]?t:new x.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:x.makeArray(e,[t]),d=x.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(r,e))){if(!i&&!d.noBubble&&!A(r)){for(u=d.delegateType||m,Ce.test(u+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),c=s;c===(r.ownerDocument||a)&&v.push(c.defaultView||c.parentWindow||n)}for(o=0;(s=v[o++])&&!t.isPropagationStopped();)p=s,t.type=o>1?u:d.bindType||m,(f=(Z.get(s,"events")||{})[t.type]&&Z.get(s,"handle"))&&f.apply(s,e),(f=l&&s[l])&&f.apply&&K(s)&&(t.result=f.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),e)||!K(r)||l&&y(r[m])&&!A(r)&&((c=r[l])&&(r[l]=null),x.event.triggered=m,t.isPropagationStopped()&&p.addEventListener(m,Te),r[m](),t.isPropagationStopped()&&p.removeEventListener(m,Te),x.event.triggered=void 0,c&&(r[l]=c)),t.result}},simulate:function(t,e,n){var r=x.extend(new x.Event,n,{type:t,isSimulated:!0});x.event.trigger(r,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each(function(){x.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return x.event.trigger(t,e,n,!0)}}),g.focusin||x.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){x.event.simulate(e,t.target,x.event.fix(t))};x.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=Z.access(r,e);i||r.addEventListener(t,n,!0),Z.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Z.access(r,e)-1;i?Z.access(r,e,i):(r.removeEventListener(t,n,!0),Z.remove(r,e))}}});var ke=n.location,Ee=Date.now(),$e=/\?/;x.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+t),e};var Se=/\[\]$/,Be=/\r?\n/g,De=/^(?:submit|button|image|reset|file)$/i,Oe=/^(?:input|select|textarea|keygen)/i;function Ie(t,e,n,r){var i;if(Array.isArray(e))x.each(e,function(e,i){n||Se.test(t)?r(t,i):Ie(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==w(e))r(t,e);else for(i in e)Ie(t+"["+i+"]",e[i],n,r)}x.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,function(){i(this.name,this.value)});else for(n in t)Ie(n,t[n],e,i);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&Oe.test(this.nodeName)&&!De.test(t)&&(this.checked||!vt.test(t))}).map(function(t,e){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(t){return{name:e.name,value:t.replace(Be,"\r\n")}}):{name:e.name,value:n.replace(Be,"\r\n")}}).get()}});var Ne=/%20/g,je=/#.*$/,Pe=/([?&])_=[^&]*/,Re=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,Fe={},Ue={},He="*/".concat("*"),ze=a.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(L)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function We(t,e,n,r){var i={},o=t===Ue;function a(s){var c;return i[s]=!0,x.each(t[s]||[],function(t,s){var u=s(e,n,r);return"string"!=typeof u||o||i[u]?o?!(c=u):void 0:(e.dataTypes.unshift(u),a(u),!1)}),c}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Ve(t,e){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&x.extend(!0,t,r),t}ze.href=ke.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ke.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ke.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ve(Ve(t,x.ajaxSettings),e):Ve(x.ajaxSettings,t)},ajaxPrefilter:qe(Fe),ajaxTransport:qe(Ue),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,s,c,u,l,f,d,p,h=x.ajaxSetup({},e),v=h.context||h,m=h.context&&(v.nodeType||v.jquery)?x(v):x.event,g=x.Deferred(),y=x.Callbacks("once memory"),A=h.statusCode||{},_={},b={},w="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Re.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=b[t.toLowerCase()]=b[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)A[e]=[A[e],t[e]];return this},abort:function(t){var e=t||w;return r&&r.abort(e),T(0,e),this}};if(g.promise(C),h.url=((t||h.url||ke.href)+"").replace(Me,ke.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(L)||[""],null==h.crossDomain){u=a.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=ze.protocol+"//"+ze.host!=u.protocol+"//"+u.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=x.param(h.data,h.traditional)),We(Fe,h,e,C),l)return C;for(d in(f=x.event&&h.global)&&0==x.active++&&x.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Le.test(h.type),i=h.url.replace(je,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ne,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=($e.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Pe,"$1"),p=($e.test(i)?"&":"?")+"_="+Ee+++p),h.url=i+p),h.ifModified&&(x.lastModified[i]&&C.setRequestHeader("If-Modified-Since",x.lastModified[i]),x.etag[i]&&C.setRequestHeader("If-None-Match",x.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+He+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(v,C,h)||l))return C.abort();if(w="abort",y.add(h.complete),C.done(h.success),C.fail(h.error),r=We(Ue,h,e,C)){if(C.readyState=1,f&&m.trigger("ajaxSend",[C,h]),l)return C;h.async&&h.timeout>0&&(c=n.setTimeout(function(){C.abort("timeout")},h.timeout));try{l=!1,r.send(_,T)}catch(t){if(l)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,a,s){var u,d,p,_,b,w=e;l||(l=!0,c&&n.clearTimeout(c),r=void 0,o=s||"",C.readyState=t>0?4:0,u=t>=200&&t<300||304===t,a&&(_=function(t,e,n){for(var r,i,o,a,s=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}if(c[0]in n)o=c[0];else{for(i in n){if(!c[0]||t.converters[i+" "+c[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==c[0]&&c.unshift(o),n[o]}(h,C,a)),_=function(t,e,n,r){var i,o,a,s,c,u={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!c&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=o,o=l.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(a=u[c+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[c+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+c+" to "+o}}}return{state:"success",data:e}}(h,_,C,u),u?(h.ifModified&&((b=C.getResponseHeader("Last-Modified"))&&(x.lastModified[i]=b),(b=C.getResponseHeader("etag"))&&(x.etag[i]=b)),204===t||"HEAD"===h.type?w="nocontent":304===t?w="notmodified":(w=_.state,d=_.data,u=!(p=_.error))):(p=w,!t&&w||(w="error",t<0&&(t=0))),C.status=t,C.statusText=(e||w)+"",u?g.resolveWith(v,[d,w,C]):g.rejectWith(v,[C,w,p]),C.statusCode(A),A=void 0,f&&m.trigger(u?"ajaxSuccess":"ajaxError",[C,h,u?d:p]),y.fireWith(v,[C,w]),f&&(m.trigger("ajaxComplete",[C,h]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return x.get(t,e,n,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],function(t,e){x[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),x.ajax(x.extend({url:t,type:e,dataType:i,data:n,success:r},x.isPlainObject(t)&&t))}}),x._evalUrl=function(t,e){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){x.globalEval(t,e)}})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return y(t)?this.each(function(e){x(this).wrapInner(t.call(this,e))}):this.each(function(){var e=x(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=y(t);return this.each(function(n){x(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Qe={0:200,1223:204},Ye=x.ajaxSettings.xhr();g.cors=!!Ye&&"withCredentials"in Ye,g.ajax=Ye=!!Ye,x.ajaxTransport(function(t){var e,r;if(g.cors||Ye&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Qe[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),x.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),x.ajaxTransport("script",function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=x(" From 7f887e294acc1166acdedb5bef5151790d470d17 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 08:00:27 +0200 Subject: [PATCH 47/65] Fix some charts. --- app/Http/Controllers/Chart/CategoryController.php | 6 +++--- .../Controllers/Chart/CategoryReportController.php | 4 ++-- app/Http/Controllers/Chart/ReportController.php | 3 ++- app/Http/Controllers/Chart/TagReportController.php | 2 +- app/Http/Controllers/Report/BillController.php | 12 ++++++------ app/Repositories/Category/CategoryRepository.php | 5 +++-- .../Category/CategoryRepositoryInterface.php | 4 ++++ app/Support/Http/Controllers/PeriodOverview.php | 2 +- 8 files changed, 22 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 3f3c730ad8..52803ee0d2 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -81,7 +81,7 @@ class CategoryController extends Controller $cache->addProperty('chart.category.all'); $cache->addProperty($category->id); if ($cache->has()) { - //return response()->json($cache->get()); // @codeCoverageIgnore + return response()->json($cache->get()); // @codeCoverageIgnore } $start = $repository->firstUseDate($category) ?? $this->getDate(); $range = app('preferences')->get('viewRange', '1M')->data; @@ -216,7 +216,7 @@ class CategoryController extends Controller $cache->addProperty($accounts->pluck('id')->toArray()); $cache->addProperty($category); if ($cache->has()) { - return response()->json($cache->get());// @codeCoverageIgnore + return response()->json($cache->get());// @codeCoverageIgnore } $repository = app(CategoryRepositoryInterface::class); $expenses = $repository->periodExpenses(new Collection([$category]), $accounts, $start, $end); @@ -248,7 +248,7 @@ class CategoryController extends Controller $spent = $expenses[$category->id]['entries'][$period] ?? '0'; $earned = $income[$category->id]['entries'][$period] ?? '0'; $sum = bcadd($spent, $earned); - $chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 12); + $chartData[0]['entries'][$label] = round($spent, 12); $chartData[1]['entries'][$label] = round($earned, 12); $chartData[2]['entries'][$label] = round($sum, 12); } diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php index 7ff5b30114..a7ea4ee54c 100644 --- a/app/Http/Controllers/Chart/CategoryReportController.php +++ b/app/Http/Controllers/Chart/CategoryReportController.php @@ -208,7 +208,7 @@ class CategoryReportController extends Controller $cache->addProperty($start); $cache->addProperty($end); if ($cache->has()) { - //return response()->json($cache->get()); // @codeCoverageIgnore + return response()->json($cache->get()); // @codeCoverageIgnore } $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); @@ -262,7 +262,7 @@ class CategoryReportController extends Controller $labelOut = $category->id . '-out'; $labelSumIn = $category->id . '-total-in'; $labelSumOut = $category->id . '-total-out'; - $currentIncome = bcmul($income[$category->id] ?? '0','-1'); + $currentIncome = $income[$category->id] ?? '0'; $currentExpense = $expenses[$category->id] ?? '0'; // add to sum: diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 1daa4ea023..c9fbaecc46 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -86,7 +86,7 @@ class ReportController extends Controller /** @var AccountRepositoryInterface $accountRepository */ $accountRepository = app(AccountRepositoryInterface::class); $filtered = $accounts->filter( - function (Account $account) use ($accountRepository) { + static function (Account $account) use ($accountRepository) { $includeNetWorth = $accountRepository->getMetaValue($account, 'include_net_worth'); $result = null === $includeNetWorth ? true : '1' === $includeNetWorth; if (false === $result) { @@ -97,6 +97,7 @@ class ReportController extends Controller } ); + // TODO get liabilities and include those as well? while ($current < $end) { // get balances by date, grouped by currency. diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php index 3575a66471..8b38d2767a 100644 --- a/app/Http/Controllers/Chart/TagReportController.php +++ b/app/Http/Controllers/Chart/TagReportController.php @@ -201,7 +201,7 @@ class TagReportController extends Controller $cache->addProperty($start); $cache->addProperty($end); if ($cache->has()) { - //return response()->json($cache->get()); // @codeCoverageIgnore + return response()->json($cache->get()); // @codeCoverageIgnore } $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); diff --git a/app/Http/Controllers/Report/BillController.php b/app/Http/Controllers/Report/BillController.php index ca5d88cf73..a028bff7a4 100644 --- a/app/Http/Controllers/Report/BillController.php +++ b/app/Http/Controllers/Report/BillController.php @@ -48,7 +48,7 @@ class BillController extends Controller $cache->addProperty('bill-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - //return $cache->get(); // @codeCoverageIgnore + return $cache->get(); // @codeCoverageIgnore } @@ -57,13 +57,13 @@ class BillController extends Controller $report = $helper->getBillReport($accounts, $start, $end); -// try { + try { $result = view('reports.partials.bills', compact('report'))->render(); // @codeCoverageIgnoreStart -// } catch (Throwable $e) { -// Log::debug(sprintf('Could not render reports.partials.budgets: %s', $e->getMessage())); -// $result = 'Could not render view.'; -// } + } catch (Throwable $e) { + Log::debug(sprintf('Could not render reports.partials.budgets: %s', $e->getMessage())); + $result = 'Could not render view.'; + } // @codeCoverageIgnoreEnd $cache->store($result); diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 39d08ed611..343b581452 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -475,6 +475,7 @@ class CategoryRepository implements CategoryRepositoryInterface /** + * TODO not multi currency aware. * @param Collection $categories * @param Collection $accounts * @param Carbon $start @@ -510,7 +511,7 @@ class CategoryRepository implements CategoryRepositoryInterface foreach ($journals as $journal) { $categoryId = (int)$journal['category_id']; $date = $journal['date']->format($carbonFormat); - $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', $journal['amount']); + $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', bcmul($journal['amount'],'-1')); } return $data; @@ -548,7 +549,7 @@ class CategoryRepository implements CategoryRepositoryInterface if (!isset($result['entries'][$date])) { $result['entries'][$date] = '0'; } - $result['entries'][$date] = bcadd($result['entries'][$date], $journal['amount']); + $result['entries'][$date] = bcadd($result['entries'][$date], bcmul($journal['amount'],'-1')); } Log::debug('Done looping transactions..'); Log::debug('Finished periodIncomeNoCategory()'); diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index bf70c93d51..973e594e8b 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -137,6 +137,7 @@ interface CategoryRepositoryInterface public function lastUseDate(Category $category, Collection $accounts): ?Carbon; /** + * TODO not multi-currency * @param Collection $categories * @param Collection $accounts * @param Carbon $start @@ -149,6 +150,7 @@ interface CategoryRepositoryInterface /** + * TODO not multi-currency * @param Collection $accounts * @param Carbon $start * @param Carbon $end @@ -158,6 +160,7 @@ interface CategoryRepositoryInterface public function periodExpensesNoCategory(Collection $accounts, Carbon $start, Carbon $end): array; /** + * TODO not multi-currency * @param Collection $categories * @param Collection $accounts * @param Carbon $start @@ -168,6 +171,7 @@ interface CategoryRepositoryInterface public function periodIncome(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array; /** + * TODO not multi-currency * @param Collection $accounts * @param Carbon $start * @param Carbon $end diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index 285d611040..1826e77f2e 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -375,7 +375,7 @@ trait PeriodOverview $cache->addProperty('tag-period-entries'); $cache->addProperty($tag->id); if ($cache->has()) { - // return $cache->get(); // @codeCoverageIgnore + return $cache->get(); // @codeCoverageIgnore } /** @var array $dates */ $dates = app('navigation')->blockPeriods($start, $end, $range); From b97d3d3627753bbb3d5333ff3bc00a9855f885da Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 08:04:41 +0200 Subject: [PATCH 48/65] And fix sorting. --- app/Repositories/Account/AccountTasker.php | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index 81664d9802..f58a6d6dce 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -146,15 +146,14 @@ class AccountTasker implements AccountTaskerInterface $report = $this->groupExpenseByDestination($journals); - // TODO sorting -// // sort the result -// // Obtain a list of columns -// $sum = []; -// foreach ($expenses as $accountId => $row) { -// $sum[$accountId] = (float)$row['sum']; -// } -// -// array_multisort($sum, SORT_ASC, $expenses); + // sort the result + // Obtain a list of columns + $sum = []; + foreach ($report['accounts'] as $accountId => $row) { + $sum[$accountId] = (float)$row['sum']; + } + + array_multisort($sum, SORT_ASC, $report['accounts']); return $report; } @@ -181,13 +180,12 @@ class AccountTasker implements AccountTaskerInterface // sort the result // Obtain a list of columns - // $sum = []; - // foreach ($report['income'] as $accountId => $row) { - // $sum[$accountId] = (float)$row['sum']; - // } - // TODO proper sorting. - //array_multisort($sum, SORT_DESC, $report); - // var_dump($report);exit; + $sum = []; + foreach ($report['accounts'] as $accountId => $row) { + $sum[$accountId] = (float)$row['sum']; + } + + array_multisort($sum, SORT_DESC, $report['accounts']); return $report; } From 79cf61b653d97af35c5e045d94460eaaa41f9275 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 08:29:35 +0200 Subject: [PATCH 49/65] Fix #2434 --- .../Controllers/Account/DeleteController.php | 11 + .../Controllers/Account/EditController.php | 11 +- .../Account/ReconcileController.php | 12 + .../Controllers/Account/ShowController.php | 10 +- .../Transaction/ConvertController.php | 15 +- .../Transaction/DeleteController.php | 10 + .../Transaction/EditController.php | 7 +- .../Http/Controllers/UserNavigation.php | 253 ++++++++++++------ resources/lang/en_US/firefly.php | 53 ++-- resources/views/v1/transactions/show.twig | 3 +- 10 files changed, 259 insertions(+), 126 deletions(-) diff --git a/app/Http/Controllers/Account/DeleteController.php b/app/Http/Controllers/Account/DeleteController.php index c997c4814e..16f870f7bf 100644 --- a/app/Http/Controllers/Account/DeleteController.php +++ b/app/Http/Controllers/Account/DeleteController.php @@ -27,6 +27,7 @@ namespace FireflyIII\Http\Controllers\Account; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Account; use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Support\Http\Controllers\UserNavigation; use Illuminate\Http\Request; /** @@ -34,6 +35,8 @@ use Illuminate\Http\Request; */ class DeleteController extends Controller { + use UserNavigation; + /** @var AccountRepositoryInterface The account repository */ private $repository; @@ -67,6 +70,10 @@ class DeleteController extends Controller */ public function delete(Account $account) { + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore + } + $typeName = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type)); $subTitle = (string)trans(sprintf('firefly.delete_%s_account', $typeName), ['name' => $account->name]); $accountList = app('expandedform')->makeSelectListWithEmpty($this->repository->getAccountsByType([$account->accountType->type])); @@ -89,6 +96,10 @@ class DeleteController extends Controller */ public function destroy(Request $request, Account $account) { + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore + } + $type = $account->accountType->type; $typeName = config(sprintf('firefly.shortNamesByFullName.%s', $type)); $name = $account->name; diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index 117f515dca..923d95e786 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -30,6 +30,7 @@ use FireflyIII\Models\Account; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\Http\Controllers\ModelInformation; +use FireflyIII\Support\Http\Controllers\UserNavigation; use Illuminate\Http\Request; /** @@ -38,7 +39,7 @@ use Illuminate\Http\Request; */ class EditController extends Controller { - use ModelInformation; + use ModelInformation, UserNavigation; /** @var CurrencyRepositoryInterface The currency repository */ private $currencyRepos; /** @var AccountRepositoryInterface The account repository */ @@ -79,6 +80,10 @@ class EditController extends Controller */ public function edit(Request $request, Account $account, AccountRepositoryInterface $repository) { + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore + } + $objectType = config('firefly.shortNamesByFullName')[$account->accountType->type]; $subTitle = (string)trans(sprintf('firefly.edit_%s_account', $objectType), ['name' => $account->name]); $subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType)); @@ -144,6 +149,10 @@ class EditController extends Controller */ public function update(AccountFormRequest $request, Account $account) { + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore + } + $data = $request->getAccountData(); $this->repository->update($account, $data); diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 0b4fd5d40d..0c7398762a 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -86,6 +86,10 @@ class ReconcileController extends Controller */ public function reconcile(Account $account, Carbon $start = null, Carbon $end = null) { + 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')); @@ -146,6 +150,10 @@ class ReconcileController extends Controller */ public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end) { + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore + } + Log::debug('In ReconcileController::submit()'); $data = $request->getAll(); @@ -178,6 +186,10 @@ class ReconcileController extends Controller */ private function createReconciliation(Account $account, Carbon $start, Carbon $end, string $difference): string { + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore + } + $reconciliation = $this->accountRepos->getReconciliation($account); $currency = $this->accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency(); $source = $reconciliation; diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index 840ba8ff7a..0f6fd1cf8a 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -28,7 +28,6 @@ use Exception; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Account; -use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\Http\Controllers\PeriodOverview; @@ -87,8 +86,8 @@ class ShowController extends Controller */ public function show(Request $request, Account $account, Carbon $start = null, Carbon $end = null) { - if (in_array($account->accountType->type, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION], true)) { - return $this->redirectToOriginalAccount($account); // @codeCoverageIgnore + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore } /** @var Carbon $start */ @@ -145,9 +144,10 @@ class ShowController extends Controller */ public function showAll(Request $request, Account $account) { - if (AccountType::INITIAL_BALANCE === $account->accountType->type) { - return $this->redirectToOriginalAccount($account); // @codeCoverageIgnore + if (!$this->isEditableAccount($account)) { + return $this->redirectAccountToAccount($account); // @codeCoverageIgnore } + $isLiability = $this->repository->isLiability($account); $objectType = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type)); $end = new Carbon; diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index 1d488e1767..b6faa17a7a 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Services\Internal\Update\JournalUpdateService; use FireflyIII\Support\Http\Controllers\ModelInformation; +use FireflyIII\Support\Http\Controllers\UserNavigation; use FireflyIII\Transformers\TransactionGroupTransformer; use FireflyIII\Validation\AccountValidator; use Illuminate\Http\Request; @@ -49,7 +50,7 @@ use View; */ class ConvertController extends Controller { - use ModelInformation; + use ModelInformation, UserNavigation; /** @var JournalRepositoryInterface Journals and transactions overview */ private $repository; @@ -87,16 +88,16 @@ class ConvertController extends Controller */ public function index(TransactionType $destinationType, TransactionGroup $group) { + if (!$this->isEditableGroup($group)) { + return $this->redirectGroupToAccount($group); // @codeCoverageIgnore + } + /** @var TransactionGroupTransformer $transformer */ $transformer = app(TransactionGroupTransformer::class); /** @var TransactionJournal $first */ $first = $group->transactionJournals()->first(); $sourceType = $first->transactionType; - // return to account. - if (!in_array($sourceType->type, [TransactionType::WITHDRAWAL, TransactionType::TRANSFER, TransactionType::DEPOSIT], true)) { - return $this->redirectToAccount($first); // @codeCoverageIgnore - } $groupTitle = $group->title ?? $first->description; $groupArray = $transformer->transformObject($group); @@ -144,6 +145,10 @@ class ConvertController extends Controller */ public function postIndex(Request $request, TransactionType $destinationType, TransactionGroup $group) { + if (!$this->isEditableGroup($group)) { + return $this->redirectGroupToAccount($group); // @codeCoverageIgnore + } + /** @var TransactionJournal $journal */ foreach ($group->transactionJournals as $journal) { // catch FF exception. diff --git a/app/Http/Controllers/Transaction/DeleteController.php b/app/Http/Controllers/Transaction/DeleteController.php index 4a926364ef..a606421734 100644 --- a/app/Http/Controllers/Transaction/DeleteController.php +++ b/app/Http/Controllers/Transaction/DeleteController.php @@ -26,6 +26,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\TransactionGroup; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface; +use FireflyIII\Support\Http\Controllers\UserNavigation; use Illuminate\Http\RedirectResponse; use Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -36,6 +37,7 @@ use URL; */ class DeleteController extends Controller { + use UserNavigation; /** @var TransactionGroupRepositoryInterface */ private $repository; @@ -69,6 +71,10 @@ class DeleteController extends Controller */ public function delete(TransactionGroup $group) { + if (!$this->isEditableGroup($group)) { + return $this->redirectGroupToAccount($group); // @codeCoverageIgnore + } + Log::debug(sprintf('Start of delete view for group #%d', $group->id)); $journal = $group->transactionJournals->first(); @@ -94,6 +100,10 @@ class DeleteController extends Controller */ public function destroy(TransactionGroup $group): RedirectResponse { + if (!$this->isEditableGroup($group)) { + return $this->redirectGroupToAccount($group); // @codeCoverageIgnore + } + $journal = $group->transactionJournals->first(); if (null === $journal) { throw new NotFoundHttpException; diff --git a/app/Http/Controllers/Transaction/EditController.php b/app/Http/Controllers/Transaction/EditController.php index a31c35409e..f877939270 100644 --- a/app/Http/Controllers/Transaction/EditController.php +++ b/app/Http/Controllers/Transaction/EditController.php @@ -25,13 +25,14 @@ namespace FireflyIII\Http\Controllers\Transaction; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\TransactionGroup; use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Support\Http\Controllers\UserNavigation; /** * Class EditController */ class EditController extends Controller { - + use UserNavigation; /** * EditController constructor. * @codeCoverageIgnore @@ -66,6 +67,10 @@ class EditController extends Controller */ public function edit(TransactionGroup $transactionGroup) { + if (!$this->isEditableGroup($transactionGroup)) { + return $this->redirectGroupToAccount($transactionGroup); // @codeCoverageIgnore + } + /** @var AccountRepositoryInterface $repository */ $repository = app(AccountRepositoryInterface::class); $allowedOpposingTypes = config('firefly.allowed_opposing_types'); diff --git a/app/Support/Http/Controllers/UserNavigation.php b/app/Support/Http/Controllers/UserNavigation.php index b23e90fc1f..4575083844 100644 --- a/app/Support/Http/Controllers/UserNavigation.php +++ b/app/Support/Http/Controllers/UserNavigation.php @@ -26,8 +26,9 @@ namespace FireflyIII\Support\Http\Controllers; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Models\Transaction; +use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; -use Illuminate\Http\RedirectResponse; +use FireflyIII\Models\TransactionType; use Illuminate\Support\ViewErrorBag; use Log; @@ -37,6 +38,108 @@ use Log; */ trait UserNavigation { + + //if (!$this->isEditableAccount($account)) { + // return $this->redirectAccountToAccount($account); // @codeCoverageIgnore + // } + + /** + * Will return false if you cant edit this account type. + * + * @param Account $account + * + * @return bool + */ + protected function isEditableAccount(Account $account): bool + { + $editable = [AccountType::EXPENSE, AccountType::REVENUE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]; + $type = $account->accountType->type; + + return in_array($type, $editable, true); + } + + /** + * @param TransactionGroup $group + * + * @return bool + */ + protected function isEditableGroup(TransactionGroup $group): bool + { + /** @var TransactionJournal $journal */ + $journal = $group->transactionJournals()->first(); + if (null === $journal) { + return false; + } + $type = $journal->transactionType->type; + $editable = [TransactionType::WITHDRAWAL, TransactionType::TRANSFER, TransactionType::DEPOSIT]; + + return in_array($type, $editable, true); + } + + /** + * @param TransactionGroup $group + * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + */ + protected function redirectGroupToAccount(TransactionGroup $group) + { + /** @var TransactionJournal $journal */ + $journal = $group->transactionJournals()->first(); + if (null === $journal) { + Log::error(sprintf('No journals in group #%d', $group->id)); + + return redirect(route('index')); + } + // prefer redirect to everything but expense and revenue: + $transactions = $journal->transactions; + $ignore = [AccountType::REVENUE, AccountType::EXPENSE, AccountType::RECONCILIATION, AccountType::INITIAL_BALANCE]; + /** @var Transaction $transaction */ + foreach ($transactions as $transaction) { + $type = $transaction->account->accountType->type; + if (!in_array($type, $ignore)) { + return redirect(route('accounts.show', [$transaction->account_id])); + } + } + + return redirect(route('index')); + } + + /** + * @param Account $account + * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + */ + protected function redirectAccountToAccount(Account $account) + { + $type = $account->accountType->type; + if (AccountType::RECONCILIATION === $type || AccountType::INITIAL_BALANCE === $type) { + // reconciliation must be stored somewhere in this account's transactions. + + /** @var Transaction $transaction */ + $transaction = $account->transactions()->first(); + if (null === $transaction) { + Log::error(sprintf('Account #%d has no transactions. Dont know where it belongs.', $account->id)); + session()->flash('error', trans('firefly.cant_find_redirect_account')); + + return redirect(route('index')); + } + $journal = $transaction->transactionJournal; + /** @var Transaction $other */ + $other = $journal->transactions()->where('id', '!=', $transaction->id)->first(); + if (null === $other) { + Log::error(sprintf('Account #%d has no valid journals. Dont know where it belongs.', $account->id)); + session()->flash('error', trans('firefly.cant_find_redirect_account')); + + return redirect(route('index')); + } + + return redirect(route('accounts.show', [$other->account_id])); + } + + return redirect(route('index')); + } + + /** * Functionality:. * @@ -59,94 +162,72 @@ trait UserNavigation Log::debug(sprintf('URI is now %s (uri contains jscript)', $uri)); } - // "forbidden" words for specific identifiers: - // if these are in the previous URI, don't refer back there. - // $array = [ - // 'accounts.delete.uri' => '/accounts/show/', - // 'transactions.delete.uri' => '/transactions/show/', - // 'attachments.delete.uri' => '/attachments/show/', - // 'bills.delete.uri' => '/bills/show/', - // 'budgets.delete.uri' => '/budgets/show/', - // 'categories.delete.uri' => '/categories/show/', - // 'currencies.delete.uri' => '/currencies/show/', - // 'piggy-banks.delete.uri' => '/piggy-banks/show/', - // 'tags.delete.uri' => '/tags/show/', - // 'rules.delete.uri' => '/rules/edit/', - // 'transactions.mass-delete.uri' => '/transactions/show/', - // ]; - //$forbidden = $array[$identifier] ?? '/show/'; - //Log::debug(sprintf('The forbidden word for %s is "%s"', $identifier, $forbidden)); - - - // if ( - // !(false === strpos($identifier, 'delete')) - // && !(false === strpos($uri, $forbidden))) { - // $uri = $this->redirectUri; - // //Log::debug(sprintf('URI is now %s (identifier contains "delete")', $uri)); - // } - - - // more debug notes: - //Log::debug(sprintf('strpos($identifier, "delete"): %s', var_export(strpos($identifier, 'delete'), true))); - //Log::debug(sprintf('strpos($uri, $forbidden): %s', var_export(strpos($uri, $forbidden), true))); Log::debug(sprintf('Return direct link %s', $uri)); return $uri; } - - /** - * Redirect to asset account that transaction belongs to. - * - * @param TransactionJournal $journal - * - * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector - * @codeCoverageIgnore - */ - protected function redirectToAccount(TransactionJournal $journal) - { - $valid = [AccountType::DEFAULT, AccountType::ASSET]; - $transactions = $journal->transactions; - /** @var Transaction $transaction */ - foreach ($transactions as $transaction) { - $account = $transaction->account; - if (in_array($account->accountType->type, $valid, true)) { - return redirect(route('accounts.show', [$account->id])); - } - } - // @codeCoverageIgnoreStart - session()->flash('error', (string)trans('firefly.cannot_redirect_to_account')); - - return redirect(route('index')); - // @codeCoverageIgnoreEnd - } - - /** - * @param Account $account - * - * @return RedirectResponse|\Illuminate\Routing\Redirector - * @codeCoverageIgnore - */ - protected function redirectToOriginalAccount(Account $account) - { - /** @var Transaction $transaction */ - $transaction = $account->transactions()->first(); - if (null === $transaction) { - app('session')->flash('error', trans('firefly.account_missing_transaction', ['name' => e($account->name), 'id' => $account->id])); - Log::error(sprintf('Expected a transaction. Account #%d has none. BEEP, error.', $account->id)); - - return redirect(route('index')); - } - - $journal = $transaction->transactionJournal; - /** @var Transaction $opposingTransaction */ - $opposingTransaction = $journal->transactions()->where('transactions.id', '!=', $transaction->id)->first(); - - if (null === $opposingTransaction) { - app('session')->flash('error', trans('firefly.account_missing_transaction', ['name' => e($account->name), 'id' => $account->id])); - Log::error(sprintf('Expected an opposing transaction. Account #%d has none. BEEP, error.', $account->id)); - } - - return redirect(route('accounts.show', [$opposingTransaction->account_id])); - } + // + // /** + // * Redirect to asset account that transaction belongs to. + // * + // * @param TransactionGroup $group + // * + // * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + // * @codeCoverageIgnore + // */ + // protected function redirectToAccount(TransactionGroup $group) + // { + // $journals = $group->transactionJournals; + // $first = $journals->first(); + // + // if (null === $first) { + // return redirect(route('index')); + // } + // + // + // $valid = [AccountType::DEFAULT, AccountType::ASSET]; + // $transactions = $journal->transactions; + // /** @var Transaction $transaction */ + // foreach ($transactions as $transaction) { + // $account = $transaction->account; + // if (in_array($account->accountType->type, $valid, true)) { + // return redirect(route('accounts.show', [$account->id])); + // } + // } + // // @codeCoverageIgnoreStart + // session()->flash('error', (string)trans('firefly.cannot_redirect_to_account')); + // + // return redirect(route('index')); + // // @codeCoverageIgnoreEnd + // } + // + // /** + // * @param Account $account + // * + // * @return RedirectResponse|\Illuminate\Routing\Redirector + // * @codeCoverageIgnore + // */ + // protected function redirectToOriginalAccount(Account $account) + // { + // /** @var Transaction $transaction */ + // $transaction = $account->transactions()->first(); + // if (null === $transaction) { + // app('session')->flash('error', trans('firefly.account_missing_transaction', ['name' => e($account->name), 'id' => $account->id])); + // Log::error(sprintf('Expected a transaction. Account #%d has none. BEEP, error.', $account->id)); + // + // return redirect(route('index')); + // } + // + // $journal = $transaction->transactionJournal; + // /** @var Transaction $opposingTransaction */ + // $opposingTransaction = $journal->transactions()->where('transactions.id', '!=', $transaction->id)->first(); + // + // if (null === $opposingTransaction) { + // app('session')->flash('error', trans('firefly.account_missing_transaction', ['name' => e($account->name), 'id' => $account->id])); + // Log::error(sprintf('Expected an opposing transaction. Account #%d has none. BEEP, error.', $account->id)); + // } + // + // return redirect(route('accounts.show', [$opposingTransaction->account_id])); + // } /** * @param string $identifier diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index c23138e724..cc627a797e 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -756,32 +756,33 @@ return [ 'start_of_reconcile_period' => 'Start of reconcile period: :period', 'start_balance' => 'Start balance', 'end_balance' => 'End balance', - 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"', - 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.', - 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"', - 'date_change_instruction' => 'If you change the date range now, any progress will be lost.', - 'update_selection' => 'Update selection', - 'store_reconcile' => 'Store reconciliation', - 'reconciliation_transaction' => 'Reconciliation transaction', - 'Reconciliation' => 'Reconciliation', - 'reconciliation' => 'Reconciliation', - 'reconcile_options' => 'Reconciliation options', - 'reconcile_range' => 'Reconciliation range', - 'start_reconcile' => 'Start reconciling', - 'cash_account_type' => 'Cash', - 'cash' => 'cash', - 'account_type' => 'Account type', - 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', - 'stored_new_account' => 'New account ":name" stored!', - 'updated_account' => 'Updated account ":name"', - 'credit_card_options' => 'Credit card options', - 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', - 'no_transactions_period' => 'There are no transactions (in this period).', - 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', - 'select_at_least_one_account' => 'Please select at least one asset account', - 'select_at_least_one_category' => 'Please select at least one category', - 'select_at_least_one_budget' => 'Please select at least one budget', - 'select_at_least_one_tag' => 'Please select at least one tag', + 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"', + 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.', + 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"', + 'date_change_instruction' => 'If you change the date range now, any progress will be lost.', + 'update_selection' => 'Update selection', + 'store_reconcile' => 'Store reconciliation', + 'reconciliation_transaction' => 'Reconciliation transaction', + 'Reconciliation' => 'Reconciliation', + 'reconciliation' => 'Reconciliation', + 'reconcile_options' => 'Reconciliation options', + 'reconcile_range' => 'Reconciliation range', + 'start_reconcile' => 'Start reconciling', + 'cash_account_type' => 'Cash', + 'cash' => 'cash', + 'cant_find_redirect_account' => 'Firefly III tried to redirect you but couldn\'t. Sorry about that. Back to the index.', + 'account_type' => 'Account type', + 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', + 'stored_new_account' => 'New account ":name" stored!', + 'updated_account' => 'Updated account ":name"', + 'credit_card_options' => 'Credit card options', + 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', + 'no_transactions_period' => 'There are no transactions (in this period).', + 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', + 'select_at_least_one_account' => 'Please select at least one asset account', + 'select_at_least_one_category' => 'Please select at least one category', + 'select_at_least_one_budget' => 'Please select at least one budget', + 'select_at_least_one_tag' => 'Please select at least one tag', 'select_at_least_one_expense' => 'Please select at least one combination of expense/revenue accounts. If you have none (the list is empty) this report is not available.', 'account_default_currency' => 'This will be the default currency associated with this account.', 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".', diff --git a/resources/views/v1/transactions/show.twig b/resources/views/v1/transactions/show.twig index 3b0e75c589..4a17bb36e7 100644 --- a/resources/views/v1/transactions/show.twig +++ b/resources/views/v1/transactions/show.twig @@ -176,7 +176,7 @@ title="{{ journal.source_iban|default(journal.source_name) }}">{{ journal.source_name }} → {% if type == 'Withdrawal' or type == 'Deposit' %} {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }} - {% elseif type == 'Transfer' %} + {% elseif type == 'Transfer' or type == 'Opening balance' %} {{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }} @@ -193,7 +193,6 @@ {% endif %} {% endif %} - → {{ journal.destination_name }} From 6038a68ba9291b9f49eec59786c0b7e429dafe48 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:46:32 +0200 Subject: [PATCH 50/65] Code cleanup --- app/User.php | 109 ++++++++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 49 deletions(-) diff --git a/app/User.php b/app/User.php index 330dc20a7f..cc609c62fd 100644 --- a/app/User.php +++ b/app/User.php @@ -24,6 +24,8 @@ declare(strict_types=1); namespace FireflyIII; +use Eloquent; +use Exception; use FireflyIII\Events\RequestedNewPassword; use FireflyIII\Models\Account; use FireflyIII\Models\Attachment; @@ -43,66 +45,75 @@ use FireflyIII\Models\Tag; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasManyThrough; use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\DatabaseNotification; +use Illuminate\Notifications\DatabaseNotificationCollection; use Illuminate\Notifications\Notifiable; +use Illuminate\Support\Carbon; use Illuminate\Support\Collection; +use Laravel\Passport\Client; use Laravel\Passport\HasApiTokens; +use Laravel\Passport\Token; use Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Class User. * - * @property int $id - * @property string $email - * @property bool $isAdmin used in admin user controller. - * @property bool $has2FA used in admin user controller. - * @property array $prefs used in admin user controller. - * @property string password - * @property string $mfa_secret - * @property Collection roles - * @property string blocked_code - * @property bool blocked - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at - * @property string|null $remember_token - * @property string|null $reset - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Account[] $accounts - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Attachment[] $attachments - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\AvailableBudget[] $availableBudgets - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Bill[] $bills - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Budget[] $budgets - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Category[] $categories - * @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Client[] $clients - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\CurrencyExchangeRate[] $currencyExchangeRates - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\ImportJob[] $importJobs - * @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\PiggyBank[] $piggyBanks - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Preference[] $preferences - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Recurrence[] $recurrences - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\RuleGroup[] $ruleGroups - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Rule[] $rules - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Tag[] $tags - * @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\TransactionGroup[] $transactionGroups - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\TransactionJournal[] $transactionJournals - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Transaction[] $transactions - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User newModelQuery() - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User newQuery() - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User query() - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereBlocked($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereBlockedCode($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereCreatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereEmail($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereId($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User wherePassword($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereRememberToken($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereReset($value) - * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereUpdatedAt($value) - * @mixin \Eloquent + * @property int $id + * @property string $email + * @property bool $isAdmin used in admin user + * controller. + * @property bool $has2FA used in admin user + * controller. + * @property array $prefs used in admin user + * controller. + * @property string password + * @property string $mfa_secret + * @property Collection roles + * @property string blocked_code + * @property bool blocked + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property string|null $remember_token + * @property string|null $reset + * @property-read \Illuminate\Database\Eloquent\Collection|Account[] $accounts + * @property-read \Illuminate\Database\Eloquent\Collection|Attachment[] $attachments + * @property-read \Illuminate\Database\Eloquent\Collection|AvailableBudget[] $availableBudgets + * @property-read \Illuminate\Database\Eloquent\Collection|Bill[] $bills + * @property-read \Illuminate\Database\Eloquent\Collection|Budget[] $budgets + * @property-read \Illuminate\Database\Eloquent\Collection|Category[] $categories + * @property-read \Illuminate\Database\Eloquent\Collection|Client[] $clients + * @property-read \Illuminate\Database\Eloquent\Collection|CurrencyExchangeRate[] $currencyExchangeRates + * @property-read \Illuminate\Database\Eloquent\Collection|ImportJob[] $importJobs + * @property-read DatabaseNotificationCollection|DatabaseNotification[] $notifications + * @property-read \Illuminate\Database\Eloquent\Collection|PiggyBank[] $piggyBanks + * @property-read \Illuminate\Database\Eloquent\Collection|Preference[] $preferences + * @property-read \Illuminate\Database\Eloquent\Collection|Recurrence[] $recurrences + * @property-read \Illuminate\Database\Eloquent\Collection|RuleGroup[] $ruleGroups + * @property-read \Illuminate\Database\Eloquent\Collection|Rule[] $rules + * @property-read \Illuminate\Database\Eloquent\Collection|Tag[] $tags + * @property-read \Illuminate\Database\Eloquent\Collection|Token[] $tokens + * @property-read \Illuminate\Database\Eloquent\Collection|TransactionGroup[] $transactionGroups + * @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionJournals + * @property-read \Illuminate\Database\Eloquent\Collection|Transaction[] $transactions + * @method static Builder|User newModelQuery() + * @method static Builder|User newQuery() + * @method static Builder|User query() + * @method static Builder|User whereBlocked($value) + * @method static Builder|User whereBlockedCode($value) + * @method static Builder|User whereCreatedAt($value) + * @method static Builder|User whereEmail($value) + * @method static Builder|User whereId($value) + * @method static Builder|User wherePassword($value) + * @method static Builder|User whereRememberToken($value) + * @method static Builder|User whereReset($value) + * @method static Builder|User whereUpdatedAt($value) + * @mixin Eloquent */ class User extends Authenticatable { @@ -238,7 +249,7 @@ class User extends Authenticatable * Generates access token. * * @return string - * @throws \Exception + * @throws Exception */ public function generateAccessToken(): string { @@ -295,7 +306,7 @@ class User extends Authenticatable * @codeCoverageIgnore * Link to roles. * - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return BelongsToMany */ public function roles(): BelongsToMany { From acfdf7dc90bf647ac390cf594c1a3c41eba1952d Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:46:40 +0200 Subject: [PATCH 51/65] Code cleanup --- app/Api/V1/Controllers/AccountController.php | 4 +--- app/Api/V1/Controllers/AttachmentController.php | 2 +- app/Api/V1/Controllers/AvailableBudgetController.php | 2 +- app/Api/V1/Controllers/BillController.php | 2 +- app/Api/V1/Controllers/BudgetController.php | 4 +--- app/Api/V1/Controllers/BudgetLimitController.php | 2 +- app/Api/V1/Controllers/CategoryController.php | 2 +- app/Api/V1/Controllers/Controller.php | 2 +- app/Api/V1/Controllers/CurrencyController.php | 2 +- app/Api/V1/Controllers/LinkTypeController.php | 2 +- app/Api/V1/Controllers/PiggyBankController.php | 2 +- app/Api/V1/Controllers/RuleController.php | 2 +- app/Api/V1/Controllers/RuleGroupController.php | 2 +- app/Api/V1/Controllers/UserController.php | 2 +- 14 files changed, 14 insertions(+), 18 deletions(-) diff --git a/app/Api/V1/Controllers/AccountController.php b/app/Api/V1/Controllers/AccountController.php index 97090d71ba..f3e048ad30 100644 --- a/app/Api/V1/Controllers/AccountController.php +++ b/app/Api/V1/Controllers/AccountController.php @@ -47,7 +47,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class AccountController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class AccountController extends Controller { @@ -234,8 +234,6 @@ class AccountController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function transactions(Request $request, Account $account): JsonResponse { diff --git a/app/Api/V1/Controllers/AttachmentController.php b/app/Api/V1/Controllers/AttachmentController.php index 7254ed45bf..214aa2780b 100644 --- a/app/Api/V1/Controllers/AttachmentController.php +++ b/app/Api/V1/Controllers/AttachmentController.php @@ -45,7 +45,7 @@ use function strlen; /** * Class AttachmentController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class AttachmentController extends Controller { diff --git a/app/Api/V1/Controllers/AvailableBudgetController.php b/app/Api/V1/Controllers/AvailableBudgetController.php index 73cacafb97..ccb7f4e398 100644 --- a/app/Api/V1/Controllers/AvailableBudgetController.php +++ b/app/Api/V1/Controllers/AvailableBudgetController.php @@ -42,7 +42,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class AvailableBudgetController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class AvailableBudgetController extends Controller { diff --git a/app/Api/V1/Controllers/BillController.php b/app/Api/V1/Controllers/BillController.php index 7378704588..f31b7206c4 100644 --- a/app/Api/V1/Controllers/BillController.php +++ b/app/Api/V1/Controllers/BillController.php @@ -48,7 +48,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class BillController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class BillController extends Controller { diff --git a/app/Api/V1/Controllers/BudgetController.php b/app/Api/V1/Controllers/BudgetController.php index b057675f6f..7b488c3472 100644 --- a/app/Api/V1/Controllers/BudgetController.php +++ b/app/Api/V1/Controllers/BudgetController.php @@ -47,7 +47,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class BudgetController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class BudgetController extends Controller { @@ -79,8 +79,6 @@ class BudgetController extends Controller /** * Display a listing of the resource. - * - * * @param Request $request * @param Budget $budget * diff --git a/app/Api/V1/Controllers/BudgetLimitController.php b/app/Api/V1/Controllers/BudgetLimitController.php index 587d0d305a..49d1f5edfb 100644 --- a/app/Api/V1/Controllers/BudgetLimitController.php +++ b/app/Api/V1/Controllers/BudgetLimitController.php @@ -46,7 +46,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class BudgetLimitController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class BudgetLimitController extends Controller { diff --git a/app/Api/V1/Controllers/CategoryController.php b/app/Api/V1/Controllers/CategoryController.php index 93f8ab75e2..56d541b38a 100644 --- a/app/Api/V1/Controllers/CategoryController.php +++ b/app/Api/V1/Controllers/CategoryController.php @@ -44,7 +44,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class CategoryController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class CategoryController extends Controller { diff --git a/app/Api/V1/Controllers/Controller.php b/app/Api/V1/Controllers/Controller.php index 5f0717ec8f..d650b95ae4 100644 --- a/app/Api/V1/Controllers/Controller.php +++ b/app/Api/V1/Controllers/Controller.php @@ -37,7 +37,7 @@ use Symfony\Component\HttpFoundation\ParameterBag; * Class Controller. * * @codeCoverageIgnore - * @SuppressWarnings(PHPMD.NumberOfChildren) + * */ class Controller extends BaseController { diff --git a/app/Api/V1/Controllers/CurrencyController.php b/app/Api/V1/Controllers/CurrencyController.php index 04e96231cb..67fbe22ac3 100644 --- a/app/Api/V1/Controllers/CurrencyController.php +++ b/app/Api/V1/Controllers/CurrencyController.php @@ -66,7 +66,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class CurrencyController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class CurrencyController extends Controller { diff --git a/app/Api/V1/Controllers/LinkTypeController.php b/app/Api/V1/Controllers/LinkTypeController.php index 1ce5a1bc74..47a73122b7 100644 --- a/app/Api/V1/Controllers/LinkTypeController.php +++ b/app/Api/V1/Controllers/LinkTypeController.php @@ -45,7 +45,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class LinkTypeController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class LinkTypeController extends Controller { diff --git a/app/Api/V1/Controllers/PiggyBankController.php b/app/Api/V1/Controllers/PiggyBankController.php index 2f223e821a..d69fd30ccf 100644 --- a/app/Api/V1/Controllers/PiggyBankController.php +++ b/app/Api/V1/Controllers/PiggyBankController.php @@ -42,7 +42,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class PiggyBankController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class PiggyBankController extends Controller { diff --git a/app/Api/V1/Controllers/RuleController.php b/app/Api/V1/Controllers/RuleController.php index 444794f36b..cfff4945a8 100644 --- a/app/Api/V1/Controllers/RuleController.php +++ b/app/Api/V1/Controllers/RuleController.php @@ -48,7 +48,7 @@ use Log; /** * Class RuleController - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class RuleController extends Controller { diff --git a/app/Api/V1/Controllers/RuleGroupController.php b/app/Api/V1/Controllers/RuleGroupController.php index bfce0bcdc9..34db80ebb3 100644 --- a/app/Api/V1/Controllers/RuleGroupController.php +++ b/app/Api/V1/Controllers/RuleGroupController.php @@ -231,7 +231,7 @@ class RuleGroupController extends Controller * * @return JsonResponse * @throws FireflyException - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ public function testGroup(RuleGroupTestRequest $request, RuleGroup $group): JsonResponse { diff --git a/app/Api/V1/Controllers/UserController.php b/app/Api/V1/Controllers/UserController.php index 7d1cf74239..50c1a4a152 100644 --- a/app/Api/V1/Controllers/UserController.php +++ b/app/Api/V1/Controllers/UserController.php @@ -42,7 +42,7 @@ use League\Fractal\Serializer\JsonApiSerializer; /** * Class UserController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class UserController extends Controller { From 44823c6fec03fdd294919a1e979dd50f3d7dbd00 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:46:55 +0200 Subject: [PATCH 52/65] Code cleanup --- app/Console/Commands/Upgrade/MigrateToGroups.php | 2 +- app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php | 2 +- .../Commands/Upgrade/TransferCurrenciesCorrections.php | 2 -- app/Events/StoredTransactionGroup.php | 5 ++--- app/Events/UpdatedTransactionGroup.php | 1 + app/Exceptions/GracefulNotFoundHandler.php | 4 +--- app/Exceptions/Handler.php | 6 ++---- app/Factory/AccountFactory.php | 2 +- app/Factory/BudgetFactory.php | 3 +-- app/Factory/CategoryFactory.php | 3 +-- app/Factory/PiggyBankEventFactory.php | 2 +- app/Factory/PiggyBankFactory.php | 2 +- app/Factory/TransactionCurrencyFactory.php | 2 +- app/Factory/TransactionJournalMetaFactory.php | 2 -- app/Generator/Chart/Basic/ChartJsGenerator.php | 2 +- app/Generator/Chart/Basic/GeneratorInterface.php | 2 +- app/Generator/Report/Support.php | 2 +- app/Handlers/Events/VersionCheckEventHandler.php | 4 +--- app/Helpers/Chart/MetaPieChart.php | 4 +--- app/Helpers/Report/BalanceReportHelper.php | 2 -- app/Helpers/Report/ReportHelper.php | 2 -- 21 files changed, 19 insertions(+), 37 deletions(-) diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php index 2b46196a5b..a60445aab5 100644 --- a/app/Console/Commands/Upgrade/MigrateToGroups.php +++ b/app/Console/Commands/Upgrade/MigrateToGroups.php @@ -236,7 +236,7 @@ class MigrateToGroups extends Command * @param TransactionJournal $journal * * @throws Exception - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ private function makeMultiGroup(TransactionJournal $journal): void { diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php index 3af284a899..924e173d09 100644 --- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php @@ -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 diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php index 36d51f678c..45337e7e90 100644 --- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php @@ -291,8 +291,6 @@ class TransferCurrenciesCorrections extends Command } /** - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * * @param TransactionJournal $transfer */ private function updateTransferCurrency(TransactionJournal $transfer): void diff --git a/app/Events/StoredTransactionGroup.php b/app/Events/StoredTransactionGroup.php index e558dd4d36..8e00398b65 100644 --- a/app/Events/StoredTransactionGroup.php +++ b/app/Events/StoredTransactionGroup.php @@ -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) { diff --git a/app/Events/UpdatedTransactionGroup.php b/app/Events/UpdatedTransactionGroup.php index af12194b17..784178de5b 100644 --- a/app/Events/UpdatedTransactionGroup.php +++ b/app/Events/UpdatedTransactionGroup.php @@ -29,6 +29,7 @@ use Illuminate\Queue\SerializesModels; /** * Class UpdatedTransactionGroup. + * * @codeCoverageIgnore * */ diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.php index 2866feaf1a..87c50ca1c7 100644 --- a/app/Exceptions/GracefulNotFoundHandler.php +++ b/app/Exceptions/GracefulNotFoundHandler.php @@ -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 */ diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 5e6ca46764..711e1a86b4 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -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 * diff --git a/app/Factory/AccountFactory.php b/app/Factory/AccountFactory.php index 0c35036f02..8f555f57aa 100644 --- a/app/Factory/AccountFactory.php +++ b/app/Factory/AccountFactory.php @@ -189,7 +189,7 @@ class AccountFactory * @param null|string $accountType * * @return AccountType|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function getAccountType(?int $accountTypeId, ?string $accountType): ?AccountType { diff --git a/app/Factory/BudgetFactory.php b/app/Factory/BudgetFactory.php index 4824d322bc..da8882ad3b 100644 --- a/app/Factory/BudgetFactory.php +++ b/app/Factory/BudgetFactory.php @@ -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 { diff --git a/app/Factory/CategoryFactory.php b/app/Factory/CategoryFactory.php index 0e3498220e..1085b64ede 100644 --- a/app/Factory/CategoryFactory.php +++ b/app/Factory/CategoryFactory.php @@ -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 { diff --git a/app/Factory/PiggyBankEventFactory.php b/app/Factory/PiggyBankEventFactory.php index 3dcb2a1e16..597c63b22d 100644 --- a/app/Factory/PiggyBankEventFactory.php +++ b/app/Factory/PiggyBankEventFactory.php @@ -53,7 +53,7 @@ class PiggyBankEventFactory * @param PiggyBank|null $piggyBank * * @return PiggyBankEvent|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function create(TransactionJournal $journal, ?PiggyBank $piggyBank): ?PiggyBankEvent { diff --git a/app/Factory/PiggyBankFactory.php b/app/Factory/PiggyBankFactory.php index e0d98fdc6f..020399bc73 100644 --- a/app/Factory/PiggyBankFactory.php +++ b/app/Factory/PiggyBankFactory.php @@ -52,7 +52,7 @@ class PiggyBankFactory * @param null|string $piggyBankName * * @return PiggyBank|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function find(?int $piggyBankId, ?string $piggyBankName): ?PiggyBank { diff --git a/app/Factory/TransactionCurrencyFactory.php b/app/Factory/TransactionCurrencyFactory.php index 3d831791a5..f2e1a0f4cc 100644 --- a/app/Factory/TransactionCurrencyFactory.php +++ b/app/Factory/TransactionCurrencyFactory.php @@ -79,7 +79,7 @@ class TransactionCurrencyFactory * @param null|string $currencyCode * * @return TransactionCurrency|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function find(?int $currencyId, ?string $currencyCode): ?TransactionCurrency { diff --git a/app/Factory/TransactionJournalMetaFactory.php b/app/Factory/TransactionJournalMetaFactory.php index 470468349f..7e13afd8fd 100644 --- a/app/Factory/TransactionJournalMetaFactory.php +++ b/app/Factory/TransactionJournalMetaFactory.php @@ -49,8 +49,6 @@ class TransactionJournalMetaFactory * @param array $data * * @return TransactionJournalMeta|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function updateOrCreate(array $data): ?TransactionJournalMeta { diff --git a/app/Generator/Chart/Basic/ChartJsGenerator.php b/app/Generator/Chart/Basic/ChartJsGenerator.php index 04a0fcb9ca..c0a4e0a39c 100644 --- a/app/Generator/Chart/Basic/ChartJsGenerator.php +++ b/app/Generator/Chart/Basic/ChartJsGenerator.php @@ -109,7 +109,7 @@ class ChartJsGenerator implements GeneratorInterface * ] * ] * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five. + * // it's five. * * @param array $data * diff --git a/app/Generator/Chart/Basic/GeneratorInterface.php b/app/Generator/Chart/Basic/GeneratorInterface.php index cc7d55626c..75fa3e63ff 100644 --- a/app/Generator/Chart/Basic/GeneratorInterface.php +++ b/app/Generator/Chart/Basic/GeneratorInterface.php @@ -60,7 +60,7 @@ interface GeneratorInterface * ] * ] * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five. + * // it's five. * * @param array $data * diff --git a/app/Generator/Report/Support.php b/app/Generator/Report/Support.php index 1f5e8d3b78..d004291fc9 100644 --- a/app/Generator/Report/Support.php +++ b/app/Generator/Report/Support.php @@ -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 diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php index 9a0029c74c..2316d040dc 100644 --- a/app/Handlers/Events/VersionCheckEventHandler.php +++ b/app/Handlers/Events/VersionCheckEventHandler.php @@ -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 diff --git a/app/Helpers/Chart/MetaPieChart.php b/app/Helpers/Chart/MetaPieChart.php index 55c58704a7..4eb1efccd7 100644 --- a/app/Helpers/Chart/MetaPieChart.php +++ b/app/Helpers/Chart/MetaPieChart.php @@ -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 { diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php index 537586823f..4dbbe70a9e 100644 --- a/app/Helpers/Report/BalanceReportHelper.php +++ b/app/Helpers/Report/BalanceReportHelper.php @@ -43,8 +43,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface /** * ReportHelper constructor. - * - * * @param BudgetRepositoryInterface $budgetRepository */ public function __construct(BudgetRepositoryInterface $budgetRepository) diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 0d09d8e40a..a3b502c873 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -43,8 +43,6 @@ class ReportHelper implements ReportHelperInterface /** * ReportHelper constructor. - * - * * @param BudgetRepositoryInterface $budgetRepository */ public function __construct(BudgetRepositoryInterface $budgetRepository) From 23479790fe545c912f535bfa1a9fc49048388ff0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:47:10 +0200 Subject: [PATCH 53/65] Code cleanup --- app/Http/Controllers/Account/EditController.php | 2 -- app/Http/Controllers/Account/ShowController.php | 4 +--- app/Http/Controllers/BillController.php | 4 +--- app/Http/Controllers/Budget/AmountController.php | 5 ----- app/Http/Controllers/Budget/IndexController.php | 2 -- app/Http/Controllers/Category/ShowController.php | 3 +-- app/Http/Controllers/Chart/AccountController.php | 8 +++----- app/Http/Controllers/Chart/BudgetController.php | 12 ++---------- .../Controllers/Chart/BudgetReportController.php | 8 +------- .../Controllers/Chart/CategoryController.php | 6 ------ .../Chart/CategoryReportController.php | 12 ++---------- .../Chart/ExpenseReportController.php | 4 +--- .../Controllers/Chart/PiggyBankController.php | 2 -- app/Http/Controllers/Chart/ReportController.php | 4 ---- .../Controllers/Chart/TagReportController.php | 16 +--------------- app/Http/Controllers/Controller.php | 2 +- app/Http/Controllers/CurrencyController.php | 2 -- app/Http/Controllers/DebugController.php | 6 +----- app/Http/Controllers/Import/IndexController.php | 2 -- .../Import/JobConfigurationController.php | 4 ---- .../Import/PrerequisitesController.php | 8 ++------ .../Controllers/Json/AutoCompleteController.php | 2 +- app/Http/Controllers/Json/BoxController.php | 6 ------ .../Controllers/Json/RecurrenceController.php | 6 ++---- app/Http/Controllers/PiggyBankController.php | 8 ++------ app/Http/Controllers/Popup/ReportController.php | 4 ++-- app/Http/Controllers/PreferencesController.php | 2 -- app/Http/Controllers/ProfileController.php | 8 ++------ .../Controllers/Recurring/EditController.php | 2 -- .../Controllers/Recurring/IndexController.php | 2 +- app/Http/Controllers/ReportController.php | 8 +++----- app/Http/Controllers/Rule/CreateController.php | 6 +----- app/Http/Controllers/Rule/EditController.php | 2 -- app/Http/Controllers/Rule/IndexController.php | 1 - app/Http/Controllers/Rule/SelectController.php | 6 +----- .../Controllers/RuleGroup/EditController.php | 1 - app/Http/Controllers/TagController.php | 5 ----- .../Controllers/Transaction/BulkController.php | 2 -- .../Controllers/Transaction/MassController.php | 4 ++-- app/Http/Middleware/Authenticate.php | 2 -- app/Http/Middleware/Installer.php | 6 ++---- app/Http/Middleware/Range.php | 2 -- app/Http/Requests/RecurrenceFormRequest.php | 8 +------- app/Http/Requests/Request.php | 4 +--- app/Http/Requests/RuleFormRequest.php | 2 -- 45 files changed, 38 insertions(+), 177 deletions(-) diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index 923d95e786..62ca47453c 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -75,8 +75,6 @@ class EditController extends Controller * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function edit(Request $request, Account $account, AccountRepositoryInterface $repository) { diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index 0f6fd1cf8a..1413258a59 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -39,7 +39,7 @@ use View; /** * Class ShowController * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class ShowController extends Controller { @@ -138,8 +138,6 @@ class ShowController extends Controller * @param Request $request * @param Account $account * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View - * - * * @throws Exception */ public function showAll(Request $request, Account $account) diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index 7c002a23a3..5f739eae42 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -43,7 +43,7 @@ use Symfony\Component\HttpFoundation\ParameterBag; /** * Class BillController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class BillController extends Controller { @@ -339,8 +339,6 @@ class BillController extends Controller * * @return RedirectResponse * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function store(BillFormRequest $request): RedirectResponse { diff --git a/app/Http/Controllers/Budget/AmountController.php b/app/Http/Controllers/Budget/AmountController.php index 5fc6194a91..2f17a2baae 100644 --- a/app/Http/Controllers/Budget/AmountController.php +++ b/app/Http/Controllers/Budget/AmountController.php @@ -25,18 +25,15 @@ namespace FireflyIII\Http\Controllers\Budget; use Carbon\Carbon; -use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Requests\BudgetIncomeRequest; use FireflyIII\Models\Budget; -use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Support\Http\Controllers\DateCalculation; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Collection; -use Log; /** * Class AmountController @@ -75,8 +72,6 @@ class AmountController extends Controller * @param Budget $budget * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function amount(Request $request, Budget $budget): JsonResponse { diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php index 6c52b522bd..77dcb37d1d 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -74,8 +74,6 @@ class IndexController extends Controller * @param Carbon|null $end * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function index(Request $request, Carbon $start = null, Carbon $end = null) { diff --git a/app/Http/Controllers/Category/ShowController.php b/app/Http/Controllers/Category/ShowController.php index 92e55db290..2e27a8c2eb 100644 --- a/app/Http/Controllers/Category/ShowController.php +++ b/app/Http/Controllers/Category/ShowController.php @@ -31,13 +31,12 @@ use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\Http\Controllers\PeriodOverview; use Illuminate\Http\Request; use Illuminate\Support\Collection; -use Log; /** * * Class ShowController * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class ShowController extends Controller { diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index 80987ec48f..ecac9a7c21 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -43,9 +43,9 @@ use Log; /** * Class AccountController. * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * + * + * */ class AccountController extends Controller { @@ -436,8 +436,6 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function period(Account $account, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index 96c9822c9a..bd0dc63791 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -40,8 +40,8 @@ use Illuminate\Support\Collection; /** * Class BudgetController. * - * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * + * * */ class BudgetController extends Controller @@ -181,8 +181,6 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function expenseAsset(Budget $budget, ?BudgetLimit $budgetLimit): JsonResponse { @@ -232,8 +230,6 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function expenseCategory(Budget $budget, ?BudgetLimit $budgetLimit): JsonResponse { @@ -282,8 +278,6 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function expenseExpense(Budget $budget, ?BudgetLimit $budgetLimit): JsonResponse { @@ -333,8 +327,6 @@ class BudgetController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function frontpage(): JsonResponse { diff --git a/app/Http/Controllers/Chart/BudgetReportController.php b/app/Http/Controllers/Chart/BudgetReportController.php index 8737747923..18186d2a25 100644 --- a/app/Http/Controllers/Chart/BudgetReportController.php +++ b/app/Http/Controllers/Chart/BudgetReportController.php @@ -39,7 +39,7 @@ use Illuminate\Support\Collection; * * Class BudgetReportController * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class BudgetReportController extends Controller { @@ -79,8 +79,6 @@ class BudgetReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function accountExpense(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -110,8 +108,6 @@ class BudgetReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function budgetExpense(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -141,8 +137,6 @@ class BudgetReportController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function mainChart(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 52803ee0d2..7c90d8ae22 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -71,8 +71,6 @@ class CategoryController extends Controller * @param Category $category * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function all(CategoryRepositoryInterface $repository, Category $category): JsonResponse { @@ -204,8 +202,6 @@ class CategoryController extends Controller * @param Carbon $end * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function reportPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -272,8 +268,6 @@ class CategoryController extends Controller * @param Carbon $end * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function reportPeriodNoCategory(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php index a7ea4ee54c..6e55c7dd63 100644 --- a/app/Http/Controllers/Chart/CategoryReportController.php +++ b/app/Http/Controllers/Chart/CategoryReportController.php @@ -74,8 +74,6 @@ class CategoryReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function accountExpense(Collection $accounts, Collection $categories, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -102,8 +100,6 @@ class CategoryReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function accountIncome(Collection $accounts, Collection $categories, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -133,8 +129,6 @@ class CategoryReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function categoryExpense(Collection $accounts, Collection $categories, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -164,7 +158,7 @@ class CategoryReportController extends Controller * @param string $others * * @return JsonResponse - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * */ public function categoryIncome(Collection $accounts, Collection $categories, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -195,9 +189,7 @@ class CategoryReportController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ public function mainChart(Collection $accounts, Collection $categories, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.php index 6621083e2e..9872ebe8e3 100644 --- a/app/Http/Controllers/Chart/ExpenseReportController.php +++ b/app/Http/Controllers/Chart/ExpenseReportController.php @@ -77,9 +77,7 @@ class ExpenseReportController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) + * */ public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php index fb94165760..a558e6fbb7 100644 --- a/app/Http/Controllers/Chart/PiggyBankController.php +++ b/app/Http/Controllers/Chart/PiggyBankController.php @@ -63,8 +63,6 @@ class PiggyBankController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse { diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index c9fbaecc46..efd50c17da 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -138,8 +138,6 @@ class ReportController extends Controller * @param Carbon $end * * @return \Illuminate\Http\JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -200,8 +198,6 @@ class ReportController extends Controller * * @return \Illuminate\Http\JsonResponse * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function sum(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php index 8b38d2767a..3ef5b78928 100644 --- a/app/Http/Controllers/Chart/TagReportController.php +++ b/app/Http/Controllers/Chart/TagReportController.php @@ -66,8 +66,6 @@ class TagReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function accountExpense(Collection $accounts, Collection $tags, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -97,8 +95,6 @@ class TagReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function accountIncome(Collection $accounts, Collection $tags, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -127,8 +123,6 @@ class TagReportController extends Controller * @param Carbon $end * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function budgetExpense(Collection $accounts, Collection $tags, Carbon $start, Carbon $end): JsonResponse { @@ -157,8 +151,6 @@ class TagReportController extends Controller * @param Carbon $end * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function categoryExpense(Collection $accounts, Collection $tags, Carbon $start, Carbon $end): JsonResponse { @@ -188,9 +180,7 @@ class TagReportController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ public function mainChart(Collection $accounts, Collection $tags, Carbon $start, Carbon $end): JsonResponse { @@ -305,8 +295,6 @@ class TagReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function tagExpense(Collection $accounts, Collection $tags, Carbon $start, Carbon $end, string $others): JsonResponse { @@ -336,8 +324,6 @@ class TagReportController extends Controller * @param string $others * * @return JsonResponse - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function tagIncome(Collection $accounts, Collection $tags, Carbon $start, Carbon $end, string $others): JsonResponse { diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index c5c041a3aa..f676ee4192 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -33,7 +33,7 @@ use Route; /** * Class Controller. * - * @SuppressWarnings(PHPMD.NumberOfChildren) + * */ class Controller extends BaseController { diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 6aa462e6be..ba9129c3b2 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -333,8 +333,6 @@ class CurrencyController extends Controller * @param CurrencyFormRequest $request * * @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function store(CurrencyFormRequest $request) { diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php index 8de8555f3d..f95d22aec9 100644 --- a/app/Http/Controllers/DebugController.php +++ b/app/Http/Controllers/DebugController.php @@ -39,7 +39,7 @@ use Route as RouteFacade; /** * Class DebugController * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class DebugController extends Controller { @@ -113,8 +113,6 @@ class DebugController extends Controller * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function index(Request $request) { @@ -192,8 +190,6 @@ class DebugController extends Controller * Return all possible routes. * * @return string - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function routes(): string { diff --git a/app/Http/Controllers/Import/IndexController.php b/app/Http/Controllers/Import/IndexController.php index cf4a4eadee..755b854a47 100644 --- a/app/Http/Controllers/Import/IndexController.php +++ b/app/Http/Controllers/Import/IndexController.php @@ -71,8 +71,6 @@ class IndexController extends Controller * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function create(string $importProvider) { diff --git a/app/Http/Controllers/Import/JobConfigurationController.php b/app/Http/Controllers/Import/JobConfigurationController.php index dac7b2136f..ed921f5092 100644 --- a/app/Http/Controllers/Import/JobConfigurationController.php +++ b/app/Http/Controllers/Import/JobConfigurationController.php @@ -68,8 +68,6 @@ class JobConfigurationController extends Controller * * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * */ public function index(ImportJob $importJob) { @@ -119,8 +117,6 @@ class JobConfigurationController extends Controller * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * * @throws FireflyException - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function post(Request $request, ImportJob $importJob) { diff --git a/app/Http/Controllers/Import/PrerequisitesController.php b/app/Http/Controllers/Import/PrerequisitesController.php index 7a08d0519b..3ae9a1bbc2 100644 --- a/app/Http/Controllers/Import/PrerequisitesController.php +++ b/app/Http/Controllers/Import/PrerequisitesController.php @@ -67,8 +67,6 @@ class PrerequisitesController extends Controller * @param ImportJob $importJob * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function index(string $importProvider, ImportJob $importJob = null) { @@ -111,15 +109,13 @@ class PrerequisitesController extends Controller * Whatever storePrerequisites does, it should make sure that the system is ready to continue immediately. So * no extra calls or stuff, except maybe to open a session * - * @see PrerequisitesInterface::storePrerequisites - * * @param Request $request * @param string $importProvider * @param ImportJob $importJob * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @see PrerequisitesInterface::storePrerequisites + * */ public function post(Request $request, string $importProvider, ImportJob $importJob = null) { diff --git a/app/Http/Controllers/Json/AutoCompleteController.php b/app/Http/Controllers/Json/AutoCompleteController.php index 8a42e2e3ab..69f825ffc1 100644 --- a/app/Http/Controllers/Json/AutoCompleteController.php +++ b/app/Http/Controllers/Json/AutoCompleteController.php @@ -43,7 +43,7 @@ use Log; * * TODO autocomplete for transaction types. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class AutoCompleteController extends Controller { diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php index ebdd02e6e3..137a3ae21a 100644 --- a/app/Http/Controllers/Json/BoxController.php +++ b/app/Http/Controllers/Json/BoxController.php @@ -52,8 +52,6 @@ class BoxController extends Controller * @param BudgetRepositoryInterface $repository * * @return JsonResponse - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function available(BudgetRepositoryInterface $repository): JsonResponse { @@ -110,8 +108,6 @@ class BoxController extends Controller * @param CurrencyRepositoryInterface $repository * * @return JsonResponse - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function balance(CurrencyRepositoryInterface $repository): JsonResponse { @@ -237,8 +233,6 @@ class BoxController extends Controller * Total user net worth. * * @return JsonResponse - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function netWorth(): JsonResponse { diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php index 77ef359ae4..ab89502040 100644 --- a/app/Http/Controllers/Json/RecurrenceController.php +++ b/app/Http/Controllers/Json/RecurrenceController.php @@ -63,11 +63,9 @@ class RecurrenceController extends Controller * * @param Request $request * - * @throws FireflyException * @return JsonResponse - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * @throws FireflyException */ public function events(Request $request): JsonResponse { diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php index 1c5880646a..5d4aab08b6 100644 --- a/app/Http/Controllers/PiggyBankController.php +++ b/app/Http/Controllers/PiggyBankController.php @@ -41,8 +41,8 @@ use Symfony\Component\HttpFoundation\ParameterBag; /** * Class PiggyBankController. * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * + * */ class PiggyBankController extends Controller { @@ -188,8 +188,6 @@ class PiggyBankController extends Controller * @param PiggyBank $piggyBank * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function edit(PiggyBank $piggyBank) { @@ -230,8 +228,6 @@ class PiggyBankController extends Controller * @param Request $request * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function index(Request $request) { diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index 25dfe38cb4..15956dd034 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -31,7 +31,7 @@ use Illuminate\Http\Request; /** * Class ReportController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class ReportController extends Controller { @@ -43,7 +43,7 @@ class ReportController extends Controller * @param Request $request * * @return JsonResponse - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function general(Request $request): JsonResponse { diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index eddb76fb25..7885276fb2 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -100,8 +100,6 @@ class PreferencesController extends Controller * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function postIndex(Request $request) { diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 5a37aed511..37e161cd58 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -51,8 +51,8 @@ use PragmaRX\Recovery\Recovery; * Class ProfileController. * * @method Guard guard() - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * + * */ class ProfileController extends Controller { @@ -438,8 +438,6 @@ class ProfileController extends Controller * @param TokenFormRequest $request * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function postCode(TokenFormRequest $request) { @@ -524,8 +522,6 @@ class ProfileController extends Controller * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * * @throws FireflyException - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function undoEmailChange(UserRepositoryInterface $repository, string $token, string $hash) { diff --git a/app/Http/Controllers/Recurring/EditController.php b/app/Http/Controllers/Recurring/EditController.php index e99b900814..e158cdd51c 100644 --- a/app/Http/Controllers/Recurring/EditController.php +++ b/app/Http/Controllers/Recurring/EditController.php @@ -77,8 +77,6 @@ class EditController extends Controller * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @throws \FireflyIII\Exceptions\FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function edit(Request $request, Recurrence $recurrence) { diff --git a/app/Http/Controllers/Recurring/IndexController.php b/app/Http/Controllers/Recurring/IndexController.php index b5c7af9859..c3acc0336b 100644 --- a/app/Http/Controllers/Recurring/IndexController.php +++ b/app/Http/Controllers/Recurring/IndexController.php @@ -74,7 +74,7 @@ class IndexController extends Controller * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @throws \FireflyIII\Exceptions\FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function index(Request $request) { diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index ea05e3f22c..9a1c9b2272 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -38,7 +38,7 @@ use Log; /** * Class ReportController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class ReportController extends Controller { @@ -276,7 +276,7 @@ class ReportController extends Controller * @param string $reportType * * @return mixed - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function options(string $reportType) { @@ -310,9 +310,7 @@ class ReportController extends Controller * * @throws \FireflyIII\Exceptions\FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ public function postIndex(ReportFormRequest $request) { diff --git a/app/Http/Controllers/Rule/CreateController.php b/app/Http/Controllers/Rule/CreateController.php index af9e56b033..c513838461 100644 --- a/app/Http/Controllers/Rule/CreateController.php +++ b/app/Http/Controllers/Rule/CreateController.php @@ -70,8 +70,6 @@ class CreateController extends Controller * @param RuleGroup $ruleGroup * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function create(Request $request, RuleGroup $ruleGroup = null) { @@ -120,8 +118,6 @@ class CreateController extends Controller * @param Bill $bill * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function createFromBill(Request $request, Bill $bill) { @@ -168,7 +164,7 @@ class CreateController extends Controller * @param RuleFormRequest $request * * @return RedirectResponse|\Illuminate\Routing\Redirector - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function store(RuleFormRequest $request) { diff --git a/app/Http/Controllers/Rule/EditController.php b/app/Http/Controllers/Rule/EditController.php index d136c175ee..4e33ddbcaa 100644 --- a/app/Http/Controllers/Rule/EditController.php +++ b/app/Http/Controllers/Rule/EditController.php @@ -70,8 +70,6 @@ class EditController extends Controller * @param Rule $rule * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function edit(Request $request, Rule $rule) { diff --git a/app/Http/Controllers/Rule/IndexController.php b/app/Http/Controllers/Rule/IndexController.php index 4593b67de6..7bba8ffa4c 100644 --- a/app/Http/Controllers/Rule/IndexController.php +++ b/app/Http/Controllers/Rule/IndexController.php @@ -135,7 +135,6 @@ class IndexController extends Controller * @param Rule $rule * * @return RedirectResponse|\Illuminate\Routing\Redirector - * @SuppressWarnings(PHPMD.ShortMethodName) */ public function up(Rule $rule) { diff --git a/app/Http/Controllers/Rule/SelectController.php b/app/Http/Controllers/Rule/SelectController.php index cf81e5e49a..a37b526533 100644 --- a/app/Http/Controllers/Rule/SelectController.php +++ b/app/Http/Controllers/Rule/SelectController.php @@ -47,7 +47,7 @@ use Throwable; /** * Class SelectController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class SelectController extends Controller { @@ -147,8 +147,6 @@ class SelectController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testTriggers(TestRuleFormRequest $request): JsonResponse { @@ -216,8 +214,6 @@ class SelectController extends Controller * * @return JsonResponse * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testTriggersByRule(Rule $rule): JsonResponse { diff --git a/app/Http/Controllers/RuleGroup/EditController.php b/app/Http/Controllers/RuleGroup/EditController.php index e6ab8aacf7..dfe0191bb1 100644 --- a/app/Http/Controllers/RuleGroup/EditController.php +++ b/app/Http/Controllers/RuleGroup/EditController.php @@ -105,7 +105,6 @@ class EditController extends Controller * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * - * @SuppressWarnings(PHPMD.ShortMethodName) */ public function up(RuleGroup $ruleGroup) { diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 0a1ad7a732..798a6b2c45 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -31,7 +31,6 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface; use FireflyIII\Support\Http\Controllers\PeriodOverview; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -use Illuminate\Support\Collection; use Log; /** @@ -177,8 +176,6 @@ class TagController extends Controller * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function show(Request $request, Tag $tag, Carbon $start = null, Carbon $end = null) { @@ -219,8 +216,6 @@ class TagController extends Controller * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function showAll(Request $request, Tag $tag) { diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php index 83b1d1c9b8..605ae91c2c 100644 --- a/app/Http/Controllers/Transaction/BulkController.php +++ b/app/Http/Controllers/Transaction/BulkController.php @@ -92,8 +92,6 @@ class BulkController extends Controller * @param BulkEditJournalRequest $request * * @return mixed - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function update(BulkEditJournalRequest $request) { diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index 219fd48c1f..7fb91b005e 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -42,7 +42,7 @@ use Log; /** * Class MassController. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class MassController extends Controller { @@ -90,7 +90,7 @@ class MassController extends Controller * @param MassDeleteJournalRequest $request * * @return mixed - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function destroy(MassDeleteJournalRequest $request) { diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 2c68878759..ec0cfe3d76 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -83,8 +83,6 @@ class Authenticate * @return mixed * @throws AuthenticationException * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ protected function authenticate($request, array $guards) { diff --git a/app/Http/Middleware/Installer.php b/app/Http/Middleware/Installer.php index 732289eaa8..808ff6ccc9 100644 --- a/app/Http/Middleware/Installer.php +++ b/app/Http/Middleware/Installer.php @@ -41,15 +41,13 @@ class Installer /** * Handle an incoming request. * - * @throws FireflyException - * * @param \Illuminate\Http\Request $request * @param \Closure $next * * @return mixed * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * + * @throws FireflyException * */ public function handle($request, Closure $next) diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php index b8c4bed70d..73d2f7e1a4 100644 --- a/app/Http/Middleware/Range.php +++ b/app/Http/Middleware/Range.php @@ -118,8 +118,6 @@ class Range /** * Set the range for the current view. - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function setRange(): void { diff --git a/app/Http/Requests/RecurrenceFormRequest.php b/app/Http/Requests/RecurrenceFormRequest.php index 5863128db3..ae903cf4e1 100644 --- a/app/Http/Requests/RecurrenceFormRequest.php +++ b/app/Http/Requests/RecurrenceFormRequest.php @@ -56,8 +56,6 @@ class RecurrenceFormRequest extends Request * @return array * @throws FireflyException * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getAll(): array { @@ -225,9 +223,7 @@ class RecurrenceFormRequest extends Request * @return array * @throws FireflyException * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) + * */ public function rules(): array { @@ -318,8 +314,6 @@ class RecurrenceFormRequest extends Request * Parses repetition data. * * @return array - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function parseRepetitionData(): array { diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php index d531c6f7a1..27887cc05b 100644 --- a/app/Http/Requests/Request.php +++ b/app/Http/Requests/Request.php @@ -33,7 +33,7 @@ use Log; * * @codeCoverageIgnore * - * @SuppressWarnings(PHPMD.NumberOfChildren) + * */ class Request extends FormRequest { @@ -183,8 +183,6 @@ class Request extends FormRequest * @param string $field * * @return string - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function string(string $field): string { diff --git a/app/Http/Requests/RuleFormRequest.php b/app/Http/Requests/RuleFormRequest.php index da90a90ba9..a8c5903c3f 100644 --- a/app/Http/Requests/RuleFormRequest.php +++ b/app/Http/Requests/RuleFormRequest.php @@ -45,8 +45,6 @@ class RuleFormRequest extends Request * * @return array * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function getRuleData(): array { From c2296c3ad5169489bde8507ce6b7888b08a4c729 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:47:29 +0200 Subject: [PATCH 54/65] Code cleanup --- app/Import/Converter/Amount.php | 6 +- .../JobConfiguration/FakeJobConfiguration.php | 6 +- .../JobConfiguration/FileJobConfiguration.php | 6 +- .../SpectreJobConfiguration.php | 2 +- .../JobConfiguration/YnabJobConfiguration.php | 2 +- app/Import/Routine/FakeRoutine.php | 4 +- app/Import/Routine/SpectreRoutine.php | 4 +- app/Import/Specifics/AbnAmroDescription.php | 10 +- app/Import/Specifics/Belfius.php | 2 +- app/Import/Specifics/IngBelgium.php | 2 +- app/Import/Specifics/IngDescription.php | 2 +- app/Import/Specifics/RabobankDescription.php | 2 +- app/Import/Storage/ImportArrayStorage.php | 12 +- app/Jobs/CreateRecurringTransactions.php | 8 +- app/Mail/AccessTokenCreatedMail.php | 1 + app/Mail/AdminTestMail.php | 1 + app/Mail/ConfirmEmailChangeMail.php | 1 + app/Mail/OAuthTokenCreatedMail.php | 1 + app/Mail/RegisteredUser.php | 1 + app/Mail/ReportNewJournalsMail.php | 1 + app/Mail/RequestedNewPassword.php | 1 + app/Mail/UndoEmailChangeMail.php | 1 + app/Models/Transaction.php | 4 - app/Providers/EventServiceProvider.php | 2 +- app/Providers/FireflyServiceProvider.php | 8 +- .../Account/AccountRepository.php | 2 +- .../Attachment/AttachmentRepository.php | 3 +- app/Repositories/Bill/BillRepository.php | 2 +- app/Repositories/Budget/BudgetRepository.php | 26 +- .../Category/CategoryRepository.php | 10 +- .../ImportJob/ImportJobRepository.php | 2 +- .../LinkType/LinkTypeRepository.php | 6 +- .../PiggyBank/PiggyBankRepository.php | 8 +- .../Recurring/RecurringRepository.php | 7 +- app/Repositories/Rule/RuleRepository.php | 2 +- app/Repositories/Tag/TagRepository.php | 6 +- app/Repositories/User/UserRepository.php | 2 +- app/Rules/BelongsUser.php | 6 +- app/Rules/IsAssetAccountId.php | 2 - app/Rules/IsValidAttachmentModel.php | 2 - app/Rules/UniqueIban.php | 6 +- app/Rules/ValidJournals.php | 2 +- app/Rules/ValidRecurrenceRepetitionType.php | 4 +- app/Rules/ValidRecurrenceRepetitionValue.php | 6 +- app/Services/Bunq/ApiContext.php | 4 +- .../Destroy/RecurrenceDestroyService.php | 2 +- .../Internal/Support/AccountServiceTrait.php | 2 +- .../Internal/Support/JournalServiceTrait.php | 2 +- app/Services/Spectre/Object/Holder.php | 2 +- app/Services/Spectre/Object/Transaction.php | 2 +- .../Spectre/Request/ListAccountsRequest.php | 2 +- .../Spectre/Request/ListCustomersRequest.php | 2 +- .../Spectre/Request/ListLoginsRequest.php | 2 +- .../Request/ListTransactionsRequest.php | 2 +- app/Support/Amount.php | 6 +- app/Support/Binder/AccountList.php | 2 +- app/Support/Binder/BudgetList.php | 2 +- app/Support/Binder/CategoryList.php | 2 +- app/Support/Binder/ImportProvider.php | 5 +- app/Support/ExpandedForm.php | 19 +- app/Support/Form/CurrencyForm.php | 4 +- app/Support/Http/Controllers/AugumentData.php | 16 +- .../Http/Controllers/ChartGeneration.php | 4 +- .../Http/Controllers/GetConfigurationData.php | 4 +- .../Http/Controllers/PeriodOverview.php | 3 +- .../Http/Controllers/RenderPartialViews.php | 2 +- .../Http/Controllers/RequestInformation.php | 6 +- .../Controllers/TransactionCalculation.php | 4 - .../File/ConfigureMappingHandler.php | 2 +- .../File/ConfigureRolesHandler.php | 2 +- .../Spectre/ChooseAccountsHandler.php | 2 +- .../Import/Placeholder/ImportTransaction.php | 2 +- .../Routine/File/AssetAccountMapper.php | 2 +- .../Routine/File/MappedValuesValidator.php | 2 +- .../Routine/File/OpposingAccountMapper.php | 2 +- .../Spectre/StageImportDataHandler.php | 2 +- app/Support/Navigation.php | 2 +- .../Recurring/CalculateRangeOccurrences.php | 6 +- .../Recurring/FiltersWeekends.php | 4 +- app/Support/Search/Search.php | 2 +- app/TransactionRules/Actions/ClearNotes.php | 3 +- .../Actions/ConvertToDeposit.php | 7 +- .../Actions/ConvertToWithdrawal.php | 7 +- app/TransactionRules/Actions/RemoveTag.php | 4 +- app/TransactionRules/Actions/SetBudget.php | 3 +- app/TransactionRules/Actions/SetCategory.php | 1 - .../Actions/SetDestinationAccount.php | 4 +- .../Actions/SetSourceAccount.php | 4 +- app/TransactionRules/Engine/RuleEngine.php | 193 +++++---- .../Factory/TriggerFactory.php | 4 +- app/TransactionRules/Processor.php | 383 +++++++++--------- app/TransactionRules/TransactionMatcher.php | 5 +- app/Transformers/BillTransformer.php | 2 +- app/Transformers/CategoryTransformer.php | 3 - app/Validation/FireflyValidator.php | 22 +- 95 files changed, 463 insertions(+), 507 deletions(-) diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.php index 637867f32d..c87fa7cd95 100644 --- a/app/Import/Converter/Amount.php +++ b/app/Import/Converter/Amount.php @@ -33,9 +33,9 @@ class Amount implements ConverterInterface * Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. * - Jamie Zawinski. * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.NPathComplexity) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * + * + * * @param $value * * @return string diff --git a/app/Import/JobConfiguration/FakeJobConfiguration.php b/app/Import/JobConfiguration/FakeJobConfiguration.php index b762b5397c..a515270a03 100644 --- a/app/Import/JobConfiguration/FakeJobConfiguration.php +++ b/app/Import/JobConfiguration/FakeJobConfiguration.php @@ -46,7 +46,7 @@ class FakeJobConfiguration implements JobConfigurationInterface * if stage is not "new", then album must be 'station to station' * * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function configurationComplete(): bool { @@ -70,7 +70,7 @@ class FakeJobConfiguration implements JobConfigurationInterface * * @return MessageBag * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function configureJob(array $data): MessageBag { @@ -128,7 +128,7 @@ class FakeJobConfiguration implements JobConfigurationInterface * * @return string * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getNextView(): string { diff --git a/app/Import/JobConfiguration/FileJobConfiguration.php b/app/Import/JobConfiguration/FileJobConfiguration.php index b41e8e3156..9eb1aa4f75 100644 --- a/app/Import/JobConfiguration/FileJobConfiguration.php +++ b/app/Import/JobConfiguration/FileJobConfiguration.php @@ -89,10 +89,10 @@ class FileJobConfiguration implements JobConfigurationInterface /** * Returns the view of the next step in the job configuration. * - * @throws FireflyException * @return string * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * + *@throws FireflyException */ public function getNextView(): string { @@ -132,7 +132,7 @@ class FileJobConfiguration implements JobConfigurationInterface * @return FileConfigurationInterface * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function getConfigurationObject(): FileConfigurationInterface { diff --git a/app/Import/JobConfiguration/SpectreJobConfiguration.php b/app/Import/JobConfiguration/SpectreJobConfiguration.php index fde970cd58..7f9bf1dea3 100644 --- a/app/Import/JobConfiguration/SpectreJobConfiguration.php +++ b/app/Import/JobConfiguration/SpectreJobConfiguration.php @@ -111,7 +111,7 @@ class SpectreJobConfiguration implements JobConfigurationInterface * @return SpectreJobConfigurationInterface * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function getHandler(): SpectreJobConfigurationInterface { diff --git a/app/Import/JobConfiguration/YnabJobConfiguration.php b/app/Import/JobConfiguration/YnabJobConfiguration.php index 1fabb496c7..803867e397 100644 --- a/app/Import/JobConfiguration/YnabJobConfiguration.php +++ b/app/Import/JobConfiguration/YnabJobConfiguration.php @@ -109,7 +109,7 @@ class YnabJobConfiguration implements JobConfigurationInterface * @return YnabJobConfigurationInterface * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function getHandler(): YnabJobConfigurationInterface { diff --git a/app/Import/Routine/FakeRoutine.php b/app/Import/Routine/FakeRoutine.php index 14ed949977..e271a4b1d2 100644 --- a/app/Import/Routine/FakeRoutine.php +++ b/app/Import/Routine/FakeRoutine.php @@ -52,8 +52,8 @@ class FakeRoutine implements RoutineInterface * @return void * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public function run(): void { diff --git a/app/Import/Routine/SpectreRoutine.php b/app/Import/Routine/SpectreRoutine.php index 2805142ebd..1171ff5e5e 100644 --- a/app/Import/Routine/SpectreRoutine.php +++ b/app/Import/Routine/SpectreRoutine.php @@ -49,8 +49,8 @@ class SpectreRoutine implements RoutineInterface * * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public function run(): void { diff --git a/app/Import/Specifics/AbnAmroDescription.php b/app/Import/Specifics/AbnAmroDescription.php index 7f373d897d..68b1b1e318 100644 --- a/app/Import/Specifics/AbnAmroDescription.php +++ b/app/Import/Specifics/AbnAmroDescription.php @@ -64,7 +64,7 @@ class AbnAmroDescription implements SpecificInterface * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function run(array $row): array { @@ -132,8 +132,8 @@ class AbnAmroDescription implements SpecificInterface * * @return bool true if the description is SEPA format, false otherwise * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ protected function parseSepaDescription(): bool { @@ -189,8 +189,8 @@ class AbnAmroDescription implements SpecificInterface * * @return bool true if the description is TRTP format, false otherwise * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ protected function parseTRTPDescription(): bool { diff --git a/app/Import/Specifics/Belfius.php b/app/Import/Specifics/Belfius.php index 714cfb9848..1a57f03bdd 100644 --- a/app/Import/Specifics/Belfius.php +++ b/app/Import/Specifics/Belfius.php @@ -61,7 +61,7 @@ class Belfius implements SpecificInterface * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function run(array $row): array { diff --git a/app/Import/Specifics/IngBelgium.php b/app/Import/Specifics/IngBelgium.php index b77e811696..c284e33518 100644 --- a/app/Import/Specifics/IngBelgium.php +++ b/app/Import/Specifics/IngBelgium.php @@ -59,7 +59,7 @@ class IngBelgium implements SpecificInterface * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function run(array $row): array { diff --git a/app/Import/Specifics/IngDescription.php b/app/Import/Specifics/IngDescription.php index 74d142d8d3..122437ba89 100644 --- a/app/Import/Specifics/IngDescription.php +++ b/app/Import/Specifics/IngDescription.php @@ -66,7 +66,7 @@ class IngDescription implements SpecificInterface * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function run(array $row): array { diff --git a/app/Import/Specifics/RabobankDescription.php b/app/Import/Specifics/RabobankDescription.php index 7dea7e493a..6ef8a99560 100644 --- a/app/Import/Specifics/RabobankDescription.php +++ b/app/Import/Specifics/RabobankDescription.php @@ -59,7 +59,7 @@ class RabobankDescription implements SpecificInterface * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function run(array $row): array { diff --git a/app/Import/Storage/ImportArrayStorage.php b/app/Import/Storage/ImportArrayStorage.php index b10c3a9f92..9ca1c863af 100644 --- a/app/Import/Storage/ImportArrayStorage.php +++ b/app/Import/Storage/ImportArrayStorage.php @@ -51,7 +51,7 @@ use Log; * * Class ImportArrayStorage * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class ImportArrayStorage { @@ -201,8 +201,8 @@ class ImportArrayStorage * @return Collection * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ private function storeGroupArray(): Collection { @@ -388,9 +388,9 @@ class ImportArrayStorage * * @return bool * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.NPathComplexity) + * + * + * */ private function transferExists(array $transaction): bool { diff --git a/app/Jobs/CreateRecurringTransactions.php b/app/Jobs/CreateRecurringTransactions.php index 7966641d4f..cb8dc4f88e 100644 --- a/app/Jobs/CreateRecurringTransactions.php +++ b/app/Jobs/CreateRecurringTransactions.php @@ -67,7 +67,7 @@ use Log; /** * Class CreateRecurringTransactions. - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * * */ class CreateRecurringTransactions implements ShouldQueue @@ -228,7 +228,7 @@ class CreateRecurringTransactions implements ShouldQueue * @param Carbon $date * * @return array - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ private function getTransactionData(Recurrence $recurrence, Carbon $date): array { @@ -441,8 +441,8 @@ class CreateRecurringTransactions implements ShouldQueue * @param Recurrence $recurrence * * @return bool - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * + * */ private function validRecurrence(Recurrence $recurrence): bool { diff --git a/app/Mail/AccessTokenCreatedMail.php b/app/Mail/AccessTokenCreatedMail.php index 65d702602e..9080d7503a 100644 --- a/app/Mail/AccessTokenCreatedMail.php +++ b/app/Mail/AccessTokenCreatedMail.php @@ -30,6 +30,7 @@ use Illuminate\Queue\SerializesModels; /** * Class AccessTokenCreatedMail + * * @codeCoverageIgnore */ class AccessTokenCreatedMail extends Mailable diff --git a/app/Mail/AdminTestMail.php b/app/Mail/AdminTestMail.php index 17e24ed50f..f132d0837c 100644 --- a/app/Mail/AdminTestMail.php +++ b/app/Mail/AdminTestMail.php @@ -30,6 +30,7 @@ use Illuminate\Queue\SerializesModels; * Class AdminTestMail. * * Sends a test mail to administrators. + * * @codeCoverageIgnore */ class AdminTestMail extends Mailable diff --git a/app/Mail/ConfirmEmailChangeMail.php b/app/Mail/ConfirmEmailChangeMail.php index 74d8c8b75e..3ac01c4bbe 100644 --- a/app/Mail/ConfirmEmailChangeMail.php +++ b/app/Mail/ConfirmEmailChangeMail.php @@ -30,6 +30,7 @@ use Illuminate\Queue\SerializesModels; * Class ConfirmEmailChangeMail * * Sends message to new address to confirm change. + * * @codeCoverageIgnore */ class ConfirmEmailChangeMail extends Mailable diff --git a/app/Mail/OAuthTokenCreatedMail.php b/app/Mail/OAuthTokenCreatedMail.php index f8729a4ce2..4146b0cfff 100644 --- a/app/Mail/OAuthTokenCreatedMail.php +++ b/app/Mail/OAuthTokenCreatedMail.php @@ -31,6 +31,7 @@ use Laravel\Passport\Client; /** * Class OAuthTokenCreatedMail + * * @codeCoverageIgnore */ class OAuthTokenCreatedMail extends Mailable diff --git a/app/Mail/RegisteredUser.php b/app/Mail/RegisteredUser.php index c66955da2b..f56b689e6b 100644 --- a/app/Mail/RegisteredUser.php +++ b/app/Mail/RegisteredUser.php @@ -31,6 +31,7 @@ use Illuminate\Queue\SerializesModels; * Sends newly registered user an email message. * * Class RegisteredUser + * * @codeCoverageIgnore */ class RegisteredUser extends Mailable diff --git a/app/Mail/ReportNewJournalsMail.php b/app/Mail/ReportNewJournalsMail.php index 5c38a2173a..0ffe29868c 100644 --- a/app/Mail/ReportNewJournalsMail.php +++ b/app/Mail/ReportNewJournalsMail.php @@ -31,6 +31,7 @@ use Illuminate\Support\Collection; * Class ReportNewJournalsMail. * * Sends a list of newly created journals to the user. + * * @codeCoverageIgnore */ class ReportNewJournalsMail extends Mailable diff --git a/app/Mail/RequestedNewPassword.php b/app/Mail/RequestedNewPassword.php index bc102856e4..53735fffa6 100644 --- a/app/Mail/RequestedNewPassword.php +++ b/app/Mail/RequestedNewPassword.php @@ -30,6 +30,7 @@ use Illuminate\Queue\SerializesModels; /** * Sends user link for new password. * Class RequestedNewPassword + * * @codeCoverageIgnore */ class RequestedNewPassword extends Mailable diff --git a/app/Mail/UndoEmailChangeMail.php b/app/Mail/UndoEmailChangeMail.php index 69deb68073..4b73f0468d 100644 --- a/app/Mail/UndoEmailChangeMail.php +++ b/app/Mail/UndoEmailChangeMail.php @@ -28,6 +28,7 @@ use Illuminate\Queue\SerializesModels; /** * Class UndoEmailChangeMail + * * @codeCoverageIgnore */ class UndoEmailChangeMail extends Mailable diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index 8591b1f2c0..9259fabb6f 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -23,13 +23,11 @@ declare(strict_types=1); namespace FireflyIII\Models; use Carbon\Carbon; -use FireflyIII\User; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\SoftDeletes; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Class Transaction. @@ -159,8 +157,6 @@ class Transaction extends Model /** * Check if a table is joined. * - * - * * @param Builder $query * @param string $table * diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 4afe6a89c7..c5bf2a20fa 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -112,7 +112,7 @@ class EventServiceProvider extends ServiceProvider } /** - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ protected function registerCreateEvents(): void { diff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.php index 45f2582ef9..8d15def23d 100644 --- a/app/Providers/FireflyServiceProvider.php +++ b/app/Providers/FireflyServiceProvider.php @@ -53,8 +53,8 @@ use FireflyIII\Services\IP\IPRetrievalInterface; use FireflyIII\Services\Password\PwndVerifierV3; use FireflyIII\Services\Password\Verifier; use FireflyIII\Support\Amount; -use FireflyIII\Support\FireflyConfig; use FireflyIII\Support\ExpandedForm; +use FireflyIII\Support\FireflyConfig; use FireflyIII\Support\Form\AccountForm; use FireflyIII\Support\Form\CurrencyForm; use FireflyIII\Support\Form\PiggyBankForm; @@ -63,9 +63,9 @@ use FireflyIII\Support\Navigation; use FireflyIII\Support\Preferences; use FireflyIII\Support\Steam; use FireflyIII\Support\Twig\AmountFormat; -use FireflyIII\Support\Twig\TransactionGroupTwig; use FireflyIII\Support\Twig\General; use FireflyIII\Support\Twig\Rule; +use FireflyIII\Support\Twig\TransactionGroupTwig; use FireflyIII\Support\Twig\Translation; use FireflyIII\Validation\FireflyValidator; use Illuminate\Foundation\Application; @@ -80,7 +80,7 @@ use Validator; * Class FireflyServiceProvider. * * @codeCoverageIgnore - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class FireflyServiceProvider extends ServiceProvider { @@ -108,7 +108,7 @@ class FireflyServiceProvider extends ServiceProvider /** * Register stuff. * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ public function register(): void { diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 9967f08b79..55d61a41b2 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -40,7 +40,7 @@ use Log; /** * Class AccountRepository. - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class AccountRepository implements AccountRepositoryInterface { diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.php index 7976c8c0fa..299c4c34a9 100644 --- a/app/Repositories/Attachment/AttachmentRepository.php +++ b/app/Repositories/Attachment/AttachmentRepository.php @@ -22,7 +22,6 @@ declare(strict_types=1); namespace FireflyIII\Repositories\Attachment; -use Carbon\Carbon; use Crypt; use Exception; use FireflyIII\Exceptions\FireflyException; @@ -38,7 +37,7 @@ use Log; /** * Class AttachmentRepository. - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class AttachmentRepository implements AttachmentRepositoryInterface { diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 56ea6f377c..b089ceca6d 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -41,7 +41,7 @@ use Log; /** * Class BillRepository. - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class BillRepository implements BillRepositoryInterface { diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 98352d264e..7117414748 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -46,9 +46,9 @@ use Navigation; /** * Class BudgetRepository. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * + * + * */ class BudgetRepository implements BudgetRepositoryInterface { @@ -105,7 +105,7 @@ class BudgetRepository implements BudgetRepositoryInterface * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function collectBudgetInformation(Collection $budgets, Carbon $start, Carbon $end): array { @@ -173,8 +173,8 @@ class BudgetRepository implements BudgetRepositoryInterface * @param Carbon $end * * @return Collection - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public function getBudgetLimits(Budget $budget, Carbon $start = null, Carbon $end = null): Collection { @@ -335,8 +335,8 @@ class BudgetRepository implements BudgetRepositoryInterface * @param Budget $budget * * @return Carbon - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public function firstUseDate(Budget $budget): ?Carbon { @@ -377,8 +377,8 @@ class BudgetRepository implements BudgetRepositoryInterface * @param Carbon $end * * @return Collection - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public function getAllBudgetLimits(Carbon $start = null, Carbon $end = null): Collection { @@ -870,7 +870,7 @@ class BudgetRepository implements BudgetRepositoryInterface /** * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's 5. + * // it's 5. */ public function cleanupBudgets(): bool { @@ -992,8 +992,8 @@ class BudgetRepository implements BudgetRepositoryInterface * @param string $amount * * @return BudgetLimit|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $amount): ?BudgetLimit { diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 343b581452..b901fcff5f 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -37,9 +37,9 @@ use Navigation; /** * Class CategoryRepository. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * + * + * */ class CategoryRepository implements CategoryRepositoryInterface { @@ -323,7 +323,7 @@ class CategoryRepository implements CategoryRepositoryInterface * @param Category $category * * @return Carbon|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function firstUseDate(Category $category): ?Carbon { @@ -365,7 +365,7 @@ class CategoryRepository implements CategoryRepositoryInterface * * @return Carbon|null * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function lastUseDate(Category $category, Collection $accounts): ?Carbon { diff --git a/app/Repositories/ImportJob/ImportJobRepository.php b/app/Repositories/ImportJob/ImportJobRepository.php index bd8bf775f7..155fd4e095 100644 --- a/app/Repositories/ImportJob/ImportJobRepository.php +++ b/app/Repositories/ImportJob/ImportJobRepository.php @@ -38,7 +38,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; /** * Class ImportJobRepository. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * */ class ImportJobRepository implements ImportJobRepositoryInterface { diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php index cba90c91bb..b67c1c5e02 100644 --- a/app/Repositories/LinkType/LinkTypeRepository.php +++ b/app/Repositories/LinkType/LinkTypeRepository.php @@ -34,7 +34,7 @@ use Log; /** * Class LinkTypeRepository. * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * */ class LinkTypeRepository implements LinkTypeRepositoryInterface { @@ -252,7 +252,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface * @param TransactionJournal $outward * * @return TransactionJournalLink|null - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function storeLink(array $information, TransactionJournal $inward, TransactionJournal $outward): ?TransactionJournalLink { @@ -347,7 +347,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface * @param TransactionJournalLink $link * @param string $text * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * * @throws \Exception */ private function setNoteText(TransactionJournalLink $link, string $text): void diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index fd80bca177..bc1fa1eb8d 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -37,8 +37,8 @@ use Log; /** * Class PiggyBankRepository. * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * + * */ class PiggyBankRepository implements PiggyBankRepositoryInterface { @@ -293,7 +293,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface * @param TransactionJournal $journal * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getExactAmount(PiggyBank $piggyBank, PiggyBankRepetition $repetition, TransactionJournal $journal): string { @@ -406,7 +406,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface * @param PiggyBank $piggyBank * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getSuggestedMonthlyAmount(PiggyBank $piggyBank): string { diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php index 62c75bab04..ea85e436a3 100644 --- a/app/Repositories/Recurring/RecurringRepository.php +++ b/app/Repositories/Recurring/RecurringRepository.php @@ -234,9 +234,8 @@ class RecurringRepository implements RecurringRepositoryInterface * @param Carbon $start * @param Carbon $end * - * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getOccurrencesInRange(RecurrenceRepetition $repetition, Carbon $start, Carbon $end): array { @@ -366,7 +365,7 @@ class RecurringRepository implements RecurringRepositoryInterface * @param int $count * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getXOccurrences(RecurrenceRepetition $repetition, Carbon $date, int $count): array { @@ -400,7 +399,7 @@ class RecurringRepository implements RecurringRepositoryInterface * @param RecurrenceRepetition $repetition * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function repetitionDescription(RecurrenceRepetition $repetition): string { diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php index f86f221f30..e9a1359fd0 100644 --- a/app/Repositories/Rule/RuleRepository.php +++ b/app/Repositories/Rule/RuleRepository.php @@ -34,7 +34,7 @@ use Log; /** * Class RuleRepository. * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * */ class RuleRepository implements RuleRepositoryInterface { diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 208710f825..7ebe7ab8f1 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -36,7 +36,7 @@ use Log; /** * Class TagRepository. * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * */ class TagRepository implements TagRepositoryInterface { @@ -272,7 +272,7 @@ class TagRepository implements TagRepositoryInterface * @param Carbon|null $end * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function sumsOfTag(Tag $tag, ?Carbon $start, ?Carbon $end): array { @@ -410,7 +410,7 @@ class TagRepository implements TagRepositoryInterface * @param Collection $tags * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function getMinAmount(Collection $tags): string { diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index 4ca7f388f3..a14ff743f3 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -32,7 +32,7 @@ use Log; /** * Class UserRepository. * - * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * */ class UserRepository implements UserRepositoryInterface { diff --git a/app/Rules/BelongsUser.php b/app/Rules/BelongsUser.php index c9497d45dc..9faa949ffd 100644 --- a/app/Rules/BelongsUser.php +++ b/app/Rules/BelongsUser.php @@ -69,8 +69,8 @@ class BelongsUser implements Rule * @return bool * @throws FireflyException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public function passes($attribute, $value): bool { @@ -110,7 +110,7 @@ class BelongsUser implements Rule * * @return int * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function countField(string $class, string $field, string $value): int { diff --git a/app/Rules/IsAssetAccountId.php b/app/Rules/IsAssetAccountId.php index 84c6b72bec..292035144a 100644 --- a/app/Rules/IsAssetAccountId.php +++ b/app/Rules/IsAssetAccountId.php @@ -50,8 +50,6 @@ class IsAssetAccountId implements Rule * @param mixed $value * * @return bool - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function passes($attribute, $value): bool { diff --git a/app/Rules/IsValidAttachmentModel.php b/app/Rules/IsValidAttachmentModel.php index 33ff7c0d27..132c3fae26 100644 --- a/app/Rules/IsValidAttachmentModel.php +++ b/app/Rules/IsValidAttachmentModel.php @@ -74,8 +74,6 @@ class IsValidAttachmentModel implements Rule * @param mixed $value * * @return bool - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function passes($attribute, $value): bool { diff --git a/app/Rules/UniqueIban.php b/app/Rules/UniqueIban.php index c3d18d4da2..e7ed37c61c 100644 --- a/app/Rules/UniqueIban.php +++ b/app/Rules/UniqueIban.php @@ -72,8 +72,8 @@ class UniqueIban implements Rule * @param mixed $value * * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * */ public function passes($attribute, $value): bool { @@ -127,7 +127,7 @@ class UniqueIban implements Rule /** * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function getMaxOccurrences(): array { diff --git a/app/Rules/ValidJournals.php b/app/Rules/ValidJournals.php index a9b449b9f1..719d112a8d 100644 --- a/app/Rules/ValidJournals.php +++ b/app/Rules/ValidJournals.php @@ -52,7 +52,7 @@ class ValidJournals implements Rule * @param mixed $value * * @return bool - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * */ public function passes($attribute, $value): bool { diff --git a/app/Rules/ValidRecurrenceRepetitionType.php b/app/Rules/ValidRecurrenceRepetitionType.php index c984e6b0ee..858bef0b47 100644 --- a/app/Rules/ValidRecurrenceRepetitionType.php +++ b/app/Rules/ValidRecurrenceRepetitionType.php @@ -49,8 +49,8 @@ class ValidRecurrenceRepetitionType implements Rule * @param mixed $value * * @return bool - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * + * */ public function passes($attribute, $value): bool { diff --git a/app/Rules/ValidRecurrenceRepetitionValue.php b/app/Rules/ValidRecurrenceRepetitionValue.php index 620e317e7f..bd0d59dfab 100644 --- a/app/Rules/ValidRecurrenceRepetitionValue.php +++ b/app/Rules/ValidRecurrenceRepetitionValue.php @@ -53,8 +53,8 @@ class ValidRecurrenceRepetitionValue implements Rule * @param mixed $value * * @return bool - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * + * */ public function passes($attribute, $value): bool { @@ -104,7 +104,7 @@ class ValidRecurrenceRepetitionValue implements Rule * * @return bool * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function validateNdom(string $value): bool { diff --git a/app/Services/Bunq/ApiContext.php b/app/Services/Bunq/ApiContext.php index a2950315d0..37b1c9f77c 100644 --- a/app/Services/Bunq/ApiContext.php +++ b/app/Services/Bunq/ApiContext.php @@ -47,9 +47,9 @@ class ApiContext * @param array $permittedIps * @param string|null $proxyUrl * - * @throws FireflyException * @return BunqApiContext|FakeApiContext - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * + *@throws FireflyException */ public function create(BunqEnumApiEnvironmentType $environmentType, string $apiKey, string $description, array $permittedIps, string $proxyUrl = null ) { diff --git a/app/Services/Internal/Destroy/RecurrenceDestroyService.php b/app/Services/Internal/Destroy/RecurrenceDestroyService.php index ebd7fd0a6c..b7fc3d8233 100644 --- a/app/Services/Internal/Destroy/RecurrenceDestroyService.php +++ b/app/Services/Internal/Destroy/RecurrenceDestroyService.php @@ -48,7 +48,7 @@ class RecurrenceDestroyService * Delete recurrence. * * @param Recurrence $recurrence - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function destroy(Recurrence $recurrence): void { diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index 5c759ad55b..d7fe590f87 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -86,7 +86,7 @@ trait AccountServiceTrait * * @param Account $account * @param array $data - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function updateMetaData(Account $account, array $data): void { diff --git a/app/Services/Internal/Support/JournalServiceTrait.php b/app/Services/Internal/Support/JournalServiceTrait.php index a4838d9a15..1e15c4634f 100644 --- a/app/Services/Internal/Support/JournalServiceTrait.php +++ b/app/Services/Internal/Support/JournalServiceTrait.php @@ -263,7 +263,7 @@ trait JournalServiceTrait * * @param TransactionJournal $journal * @param array $tags - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * * * @codeCoverageIgnore */ diff --git a/app/Services/Spectre/Object/Holder.php b/app/Services/Spectre/Object/Holder.php index 791abb5b7f..87389e714f 100644 --- a/app/Services/Spectre/Object/Holder.php +++ b/app/Services/Spectre/Object/Holder.php @@ -34,7 +34,7 @@ class Holder extends SpectreObject * Holder constructor. * * @param array $data - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * */ public function __construct(array $data) { diff --git a/app/Services/Spectre/Object/Transaction.php b/app/Services/Spectre/Object/Transaction.php index 974bf01cc6..82167913e5 100644 --- a/app/Services/Spectre/Object/Transaction.php +++ b/app/Services/Spectre/Object/Transaction.php @@ -175,7 +175,7 @@ class Transaction extends SpectreObject * Get opposing account data. * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getOpposingAccountData(): array { diff --git a/app/Services/Spectre/Request/ListAccountsRequest.php b/app/Services/Spectre/Request/ListAccountsRequest.php index 469ba5e313..9df314c2ae 100644 --- a/app/Services/Spectre/Request/ListAccountsRequest.php +++ b/app/Services/Spectre/Request/ListAccountsRequest.php @@ -41,7 +41,7 @@ class ListAccountsRequest extends SpectreRequest /** * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function call(): void { diff --git a/app/Services/Spectre/Request/ListCustomersRequest.php b/app/Services/Spectre/Request/ListCustomersRequest.php index f17caed6a1..823cb55ff5 100644 --- a/app/Services/Spectre/Request/ListCustomersRequest.php +++ b/app/Services/Spectre/Request/ListCustomersRequest.php @@ -39,7 +39,7 @@ class ListCustomersRequest extends SpectreRequest /** * * @throws \FireflyIII\Exceptions\FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function call(): void { diff --git a/app/Services/Spectre/Request/ListLoginsRequest.php b/app/Services/Spectre/Request/ListLoginsRequest.php index 8062ef1da6..70f3097eda 100644 --- a/app/Services/Spectre/Request/ListLoginsRequest.php +++ b/app/Services/Spectre/Request/ListLoginsRequest.php @@ -43,7 +43,7 @@ class ListLoginsRequest extends SpectreRequest /** * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function call(): void { diff --git a/app/Services/Spectre/Request/ListTransactionsRequest.php b/app/Services/Spectre/Request/ListTransactionsRequest.php index 0fd161c751..cd9c5ad1e9 100644 --- a/app/Services/Spectre/Request/ListTransactionsRequest.php +++ b/app/Services/Spectre/Request/ListTransactionsRequest.php @@ -41,7 +41,7 @@ class ListTransactionsRequest extends SpectreRequest /** * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function call(): void { diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 6f3851df4d..6155581e39 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -50,8 +50,6 @@ class Amount * * @return string * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public static function getAmountJsConfig(bool $sepBySpace, int $signPosn, string $sign, bool $csPrecedes): string { @@ -122,7 +120,7 @@ class Amount * @param bool $coloured * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function formatAnything(TransactionCurrency $format, string $amount, bool $coloured = null): string { @@ -164,7 +162,7 @@ class Amount * @param bool $coloured * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * * @noinspection MoreThanThreeArgumentsInspection */ public function formatFlat(string $symbol, int $decimalPlaces, string $amount, bool $coloured = null): string diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php index b7c05fb049..a64b0c43b4 100644 --- a/app/Support/Binder/AccountList.php +++ b/app/Support/Binder/AccountList.php @@ -40,7 +40,7 @@ class AccountList implements BinderInterface * * @return Collection * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public static function routeBinder(string $value, Route $route): Collection { diff --git a/app/Support/Binder/BudgetList.php b/app/Support/Binder/BudgetList.php index 09f6188e9a..d846318390 100644 --- a/app/Support/Binder/BudgetList.php +++ b/app/Support/Binder/BudgetList.php @@ -39,7 +39,7 @@ class BudgetList implements BinderInterface * * @return Collection * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public static function routeBinder(string $value, Route $route): Collection { diff --git a/app/Support/Binder/CategoryList.php b/app/Support/Binder/CategoryList.php index 46df804e55..c68d75823d 100644 --- a/app/Support/Binder/CategoryList.php +++ b/app/Support/Binder/CategoryList.php @@ -38,7 +38,7 @@ class CategoryList implements BinderInterface * * @return Collection * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public static function routeBinder(string $value, Route $route): Collection { diff --git a/app/Support/Binder/ImportProvider.php b/app/Support/Binder/ImportProvider.php index 5a01ff38dc..517d8c2095 100644 --- a/app/Support/Binder/ImportProvider.php +++ b/app/Support/Binder/ImportProvider.php @@ -27,7 +27,6 @@ use FireflyIII\Import\Prerequisites\PrerequisitesInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; use Illuminate\Routing\Route; -use Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** @@ -37,8 +36,8 @@ class ImportProvider implements BinderInterface { /** * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ public static function getProviders(): array { diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index a938b73572..5f5c49e4da 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -23,32 +23,17 @@ declare(strict_types=1); namespace FireflyIII\Support; use Amount as Amt; -use Carbon\Carbon; use Eloquent; -use FireflyIII\Exceptions\FireflyException; -use FireflyIII\Models\Account; -use FireflyIII\Models\AccountType; -use FireflyIII\Models\PiggyBank; -use FireflyIII\Models\RuleGroup; -use FireflyIII\Models\TransactionCurrency; -use FireflyIII\Repositories\Account\AccountRepositoryInterface; -use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; -use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; -use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\Support\Form\FormSupport; -use Form; use Illuminate\Support\Collection; -use Illuminate\Support\HtmlString; -use Illuminate\Support\MessageBag; use Log; -use RuntimeException; use Throwable; /** * Class ExpandedForm. * * @SuppressWarnings(PHPMD.TooManyMethods) - * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * * @codeCoverageIgnore */ class ExpandedForm @@ -225,7 +210,7 @@ class ExpandedForm * @param \Illuminate\Support\Collection $set * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function makeSelectListWithEmpty(Collection $set): array { diff --git a/app/Support/Form/CurrencyForm.php b/app/Support/Form/CurrencyForm.php index 8dac83b809..268cd04221 100644 --- a/app/Support/Form/CurrencyForm.php +++ b/app/Support/Form/CurrencyForm.php @@ -117,7 +117,7 @@ class CurrencyForm * @param array $options * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function allCurrencyField(string $name, string $view, $value = null, array $options = null): string { @@ -168,7 +168,7 @@ class CurrencyForm * @param array $options * * @return string - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function currencyField(string $name, string $view, $value = null, array $options = null): string { diff --git a/app/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php index 8dd95ae9b0..996159535e 100644 --- a/app/Support/Http/Controllers/AugumentData.php +++ b/app/Support/Http/Controllers/AugumentData.php @@ -79,8 +79,8 @@ trait AugumentData * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ protected function earnedByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info { @@ -352,7 +352,7 @@ trait AugumentData * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function getExpensesForBudget(Collection $limits, Budget $budget, Carbon $start, Carbon $end): array // get data + augment with info { @@ -397,7 +397,7 @@ trait AugumentData * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * * */ protected function spentInPeriodMulti(Budget $budget, Collection $limits): array // get data + augment with info @@ -586,8 +586,8 @@ trait AugumentData * @param Carbon $end * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ protected function spentByBudget(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info { @@ -647,8 +647,8 @@ trait AugumentData * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ protected function spentByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info { diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php index f6e66fee9c..759c46d142 100644 --- a/app/Support/Http/Controllers/ChartGeneration.php +++ b/app/Support/Http/Controllers/ChartGeneration.php @@ -47,8 +47,8 @@ trait ChartGeneration * * @return array * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ protected function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array // chart helper method. { diff --git a/app/Support/Http/Controllers/GetConfigurationData.php b/app/Support/Http/Controllers/GetConfigurationData.php index 94f7472d15..49c3d558d0 100644 --- a/app/Support/Http/Controllers/GetConfigurationData.php +++ b/app/Support/Http/Controllers/GetConfigurationData.php @@ -88,7 +88,7 @@ trait GetConfigurationData * Get config for date range. * * @return array - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ protected function getDateRangeConfig(): array // get configuration + get preferences. { @@ -177,7 +177,7 @@ trait GetConfigurationData * @param string $specificPage * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function getSpecificSteps(string $route, string $specificPage): array // get config values { diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index 1826e77f2e..ce045bf2ea 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -28,7 +28,6 @@ use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Models\Account; use FireflyIII\Models\Category; use FireflyIII\Models\Tag; -use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionType; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; @@ -281,7 +280,7 @@ trait PeriodOverview * @param Carbon $theDate * * @return array - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * */ protected function getNoCategoryPeriodOverview(Carbon $theDate): array { diff --git a/app/Support/Http/Controllers/RenderPartialViews.php b/app/Support/Http/Controllers/RenderPartialViews.php index 4605e9d8eb..5a2267d475 100644 --- a/app/Support/Http/Controllers/RenderPartialViews.php +++ b/app/Support/Http/Controllers/RenderPartialViews.php @@ -83,7 +83,7 @@ trait RenderPartialViews * * @return string * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function balanceAmount(array $attributes): string // generate view for report. { diff --git a/app/Support/Http/Controllers/RequestInformation.php b/app/Support/Http/Controllers/RequestInformation.php index 0a17ca3db5..b30e530e63 100644 --- a/app/Support/Http/Controllers/RequestInformation.php +++ b/app/Support/Http/Controllers/RequestInformation.php @@ -65,8 +65,8 @@ trait RequestInformation * @param string $language * * @return string - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * + * */ protected function getHelpText(string $route, string $language): string // get from internet. { @@ -213,7 +213,7 @@ trait RequestInformation * @param Carbon $date * * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function notInSessionRange(Carbon $date): bool // Validate a preference { diff --git a/app/Support/Http/Controllers/TransactionCalculation.php b/app/Support/Http/Controllers/TransactionCalculation.php index d4642e7c2a..cb2dbe5456 100644 --- a/app/Support/Http/Controllers/TransactionCalculation.php +++ b/app/Support/Http/Controllers/TransactionCalculation.php @@ -109,8 +109,6 @@ trait TransactionCalculation * @param Carbon $end * * @return array - * - * */ protected function getExpensesInCategories(Collection $accounts, Collection $categories, Carbon $start, Carbon $end): array { @@ -175,8 +173,6 @@ trait TransactionCalculation * @param Carbon $end * * @return Collection - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ protected function getIncomeForTags(Collection $accounts, Collection $tags, Carbon $start, Carbon $end): array { diff --git a/app/Support/Import/JobConfiguration/File/ConfigureMappingHandler.php b/app/Support/Import/JobConfiguration/File/ConfigureMappingHandler.php index 9eedad889a..5e71b017ce 100644 --- a/app/Support/Import/JobConfiguration/File/ConfigureMappingHandler.php +++ b/app/Support/Import/JobConfiguration/File/ConfigureMappingHandler.php @@ -272,7 +272,7 @@ class ConfigureMappingHandler implements FileConfigurationInterface * * @return array * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getValuesForMapping(Reader $reader, array $config, array $columnConfig): array { diff --git a/app/Support/Import/JobConfiguration/File/ConfigureRolesHandler.php b/app/Support/Import/JobConfiguration/File/ConfigureRolesHandler.php index 3d5c9ca4c4..a5fa035884 100644 --- a/app/Support/Import/JobConfiguration/File/ConfigureRolesHandler.php +++ b/app/Support/Import/JobConfiguration/File/ConfigureRolesHandler.php @@ -58,7 +58,7 @@ class ConfigureRolesHandler implements FileConfigurationInterface * @param array $config * * @return MessageBag - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function configurationComplete(array $config): MessageBag { diff --git a/app/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandler.php b/app/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandler.php index 3e78eb8af1..2255c29329 100644 --- a/app/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandler.php +++ b/app/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandler.php @@ -110,7 +110,7 @@ class ChooseAccountsHandler implements SpectreJobConfigurationInterface * * @return array * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function getNextData(): array { diff --git a/app/Support/Import/Placeholder/ImportTransaction.php b/app/Support/Import/Placeholder/ImportTransaction.php index 2ae4d3b3f6..3882ba8066 100644 --- a/app/Support/Import/Placeholder/ImportTransaction.php +++ b/app/Support/Import/Placeholder/ImportTransaction.php @@ -132,7 +132,7 @@ class ImportTransaction * @param ColumnValue $columnValue * * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function addColumnValue(ColumnValue $columnValue): void { diff --git a/app/Support/Import/Routine/File/AssetAccountMapper.php b/app/Support/Import/Routine/File/AssetAccountMapper.php index fa4ead0ad3..1ed799959f 100644 --- a/app/Support/Import/Routine/File/AssetAccountMapper.php +++ b/app/Support/Import/Routine/File/AssetAccountMapper.php @@ -60,7 +60,7 @@ class AssetAccountMapper * @param array $data * * @return Account - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function map(?int $accountId, array $data): Account { diff --git a/app/Support/Import/Routine/File/MappedValuesValidator.php b/app/Support/Import/Routine/File/MappedValuesValidator.php index c0bc90c704..ba0833aa23 100644 --- a/app/Support/Import/Routine/File/MappedValuesValidator.php +++ b/app/Support/Import/Routine/File/MappedValuesValidator.php @@ -81,7 +81,7 @@ class MappedValuesValidator * * @return array * @throws FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function validate(array $mappings): array { diff --git a/app/Support/Import/Routine/File/OpposingAccountMapper.php b/app/Support/Import/Routine/File/OpposingAccountMapper.php index 817f45d54b..c65c35c6f0 100644 --- a/app/Support/Import/Routine/File/OpposingAccountMapper.php +++ b/app/Support/Import/Routine/File/OpposingAccountMapper.php @@ -45,7 +45,7 @@ class OpposingAccountMapper * @param array $data * * @return Account - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function map(?int $accountId, string $amount, array $data): Account { diff --git a/app/Support/Import/Routine/Spectre/StageImportDataHandler.php b/app/Support/Import/Routine/Spectre/StageImportDataHandler.php index e0849fff7d..f63618b648 100644 --- a/app/Support/Import/Routine/Spectre/StageImportDataHandler.php +++ b/app/Support/Import/Routine/Spectre/StageImportDataHandler.php @@ -108,7 +108,7 @@ class StageImportDataHandler * @param LocalAccount $originalSource * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function convertToArray(array $transactions, SpectreAccount $spectreAccount, LocalAccount $originalSource): array { diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index d99daae6f4..66209f668f 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -104,7 +104,7 @@ class Navigation * * @return array * @throws \FireflyIII\Exceptions\FireflyException - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ public function blockPeriods(\Carbon\Carbon $start, \Carbon\Carbon $end, string $range): array { diff --git a/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php b/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php index 3763769a0c..3662fa1622 100644 --- a/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php +++ b/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php @@ -70,7 +70,7 @@ trait CalculateRangeOccurrences * @param string $moment * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function getMonthlyInRange(Carbon $start, Carbon $end, int $skipMod, string $moment): array { @@ -150,7 +150,7 @@ trait CalculateRangeOccurrences * @param string $moment * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function getWeeklyInRange(Carbon $start, Carbon $end, int $skipMod, string $moment): array { @@ -194,7 +194,7 @@ trait CalculateRangeOccurrences * @param string $moment * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ protected function getYearlyInRange(Carbon $start, Carbon $end, int $skipMod, string $moment): array { diff --git a/app/Support/Repositories/Recurring/FiltersWeekends.php b/app/Support/Repositories/Recurring/FiltersWeekends.php index 3c91f1947f..83d5be55cc 100644 --- a/app/Support/Repositories/Recurring/FiltersWeekends.php +++ b/app/Support/Repositories/Recurring/FiltersWeekends.php @@ -42,8 +42,8 @@ trait FiltersWeekends * @param array $dates * * @return array - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * */ protected function filterWeekends(RecurrenceRepetition $repetition, array $dates): array { diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php index 7d62c2cff7..32ac58a3eb 100644 --- a/app/Support/Search/Search.php +++ b/app/Support/Search/Search.php @@ -181,7 +181,7 @@ class Search implements SearchInterface * @param GroupCollectorInterface $collector * * @return GroupCollectorInterface - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * */ private function applyModifiers(GroupCollectorInterface $collector): GroupCollectorInterface { diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.php index 7b83617770..b5f4f1a114 100644 --- a/app/TransactionRules/Actions/ClearNotes.php +++ b/app/TransactionRules/Actions/ClearNotes.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; +use Exception; use FireflyIII\Models\Note; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; @@ -47,7 +48,7 @@ class ClearNotes implements ActionInterface * @param TransactionJournal $journal * * @return bool - * @throws \Exception + * @throws Exception */ public function act(TransactionJournal $journal): bool { diff --git a/app/TransactionRules/Actions/ConvertToDeposit.php b/app/TransactionRules/Actions/ConvertToDeposit.php index f06ce92b41..a5b49ee83c 100644 --- a/app/TransactionRules/Actions/ConvertToDeposit.php +++ b/app/TransactionRules/Actions/ConvertToDeposit.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Factory\AccountFactory; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; @@ -57,7 +58,7 @@ class ConvertToDeposit implements ActionInterface * @param TransactionJournal $journal * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function act(TransactionJournal $journal): bool { @@ -121,7 +122,7 @@ class ConvertToDeposit implements ActionInterface * @param TransactionJournal $journal * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ private function convertTransfer(TransactionJournal $journal): bool { @@ -163,7 +164,7 @@ class ConvertToDeposit implements ActionInterface * @param TransactionJournal $journal * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ private function convertWithdrawal(TransactionJournal $journal): bool { diff --git a/app/TransactionRules/Actions/ConvertToWithdrawal.php b/app/TransactionRules/Actions/ConvertToWithdrawal.php index 3729ec340a..63546b2d65 100644 --- a/app/TransactionRules/Actions/ConvertToWithdrawal.php +++ b/app/TransactionRules/Actions/ConvertToWithdrawal.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Factory\AccountFactory; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; @@ -58,7 +59,7 @@ class ConvertToWithdrawal implements ActionInterface * @param TransactionJournal $journal * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function act(TransactionJournal $journal): bool { @@ -122,7 +123,7 @@ class ConvertToWithdrawal implements ActionInterface * @param TransactionJournal $journal * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ private function convertDeposit(TransactionJournal $journal): bool { @@ -175,7 +176,7 @@ class ConvertToWithdrawal implements ActionInterface * @param TransactionJournal $journal * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ private function convertTransfer(TransactionJournal $journal): bool { diff --git a/app/TransactionRules/Actions/RemoveTag.php b/app/TransactionRules/Actions/RemoveTag.php index 186bc3f739..301a34baad 100644 --- a/app/TransactionRules/Actions/RemoveTag.php +++ b/app/TransactionRules/Actions/RemoveTag.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; use FireflyIII\Models\RuleAction; -use FireflyIII\Models\Tag; use FireflyIII\Models\TransactionJournal; use Log; @@ -47,6 +46,7 @@ class RemoveTag implements ActionInterface /** * Remove tag X + * * @param TransactionJournal $journal * * @return bool @@ -55,7 +55,7 @@ class RemoveTag implements ActionInterface { // if tag does not exist, no need to continue: $name = $this->action->action_value; - $tag = $journal->user->tags()->where('tag', $name)->first(); + $tag = $journal->user->tags()->where('tag', $name)->first(); if (null !== $tag) { Log::debug(sprintf('RuleAction RemoveTag removed tag #%d ("%s") from journal #%d.', $tag->id, $tag->tag, $journal->id)); diff --git a/app/TransactionRules/Actions/SetBudget.php b/app/TransactionRules/Actions/SetBudget.php index 94e85cb570..2782647000 100644 --- a/app/TransactionRules/Actions/SetBudget.php +++ b/app/TransactionRules/Actions/SetBudget.php @@ -47,13 +47,14 @@ class SetBudget implements ActionInterface /** * Set budget. + * * @param TransactionJournal $journal * * @return bool */ public function act(TransactionJournal $journal): bool { - $search = $this->action->action_value; + $search = $this->action->action_value; $budget = $journal->user->budgets()->where('name', $search)->first(); if (null === $budget) { diff --git a/app/TransactionRules/Actions/SetCategory.php b/app/TransactionRules/Actions/SetCategory.php index 04b1c77d23..6daeef7fba 100644 --- a/app/TransactionRules/Actions/SetCategory.php +++ b/app/TransactionRules/Actions/SetCategory.php @@ -24,7 +24,6 @@ namespace FireflyIII\TransactionRules\Actions; use FireflyIII\Factory\CategoryFactory; use FireflyIII\Models\RuleAction; -use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Log; diff --git a/app/TransactionRules/Actions/SetDestinationAccount.php b/app/TransactionRules/Actions/SetDestinationAccount.php index 885fc6e2ff..fc9e03b411 100644 --- a/app/TransactionRules/Actions/SetDestinationAccount.php +++ b/app/TransactionRules/Actions/SetDestinationAccount.php @@ -133,9 +133,9 @@ class SetDestinationAccount implements ActionInterface if (null === $account) { $data = [ 'name' => $this->action->action_value, - 'account_type' => 'expense', + 'account_type' => 'expense', 'account_type_id' => null, - 'virtual_balance' => 0, + 'virtual_balance' => 0, 'active' => true, 'iban' => null, ]; diff --git a/app/TransactionRules/Actions/SetSourceAccount.php b/app/TransactionRules/Actions/SetSourceAccount.php index 9622f4ea4e..a131be87f3 100644 --- a/app/TransactionRules/Actions/SetSourceAccount.php +++ b/app/TransactionRules/Actions/SetSourceAccount.php @@ -137,9 +137,9 @@ class SetSourceAccount implements ActionInterface // create new revenue account with this name: $data = [ 'name' => $this->action->action_value, - 'account_type' => 'revenue', + 'account_type' => 'revenue', 'account_type_id' => null, - 'virtual_balance' => 0, + 'virtual_balance' => 0, 'active' => true, 'iban' => null, ]; diff --git a/app/TransactionRules/Engine/RuleEngine.php b/app/TransactionRules/Engine/RuleEngine.php index aa58ff754d..170c73c371 100644 --- a/app/TransactionRules/Engine/RuleEngine.php +++ b/app/TransactionRules/Engine/RuleEngine.php @@ -45,19 +45,18 @@ class RuleEngine public const TRIGGER_STORE = 1; /** @var int */ public const TRIGGER_UPDATE = 2; - + /** @var bool */ + private $allRules; + /** @var RuleGroupRepository */ + private $ruleGroupRepository; /** @var Collection */ private $ruleGroups; /** @var array */ private $rulesToApply; - /** @var bool */ - private $allRules; - /** @var User */ - private $user; - /** @var RuleGroupRepository */ - private $ruleGroupRepository; /** @var int */ private $triggerMode; + /** @var User */ + private $user; /** * RuleEngine constructor. @@ -72,94 +71,6 @@ class RuleEngine $this->triggerMode = self::TRIGGER_STORE; } - /** - * @param int $triggerMode - */ - public function setTriggerMode(int $triggerMode): void - { - $this->triggerMode = $triggerMode; - } - - /** - * @param bool $allRules - */ - public function setAllRules(bool $allRules): void - { - Log::debug('RuleEngine will apply ALL rules.'); - $this->allRules = $allRules; - } - - - /** - * @param array $rulesToApply - */ - public function setRulesToApply(array $rulesToApply): void - { - Log::debug('RuleEngine will try rules', $rulesToApply); - $this->rulesToApply = $rulesToApply; - } - - /** - * @param User $user - */ - public function setUser(User $user): void - { - $this->user = $user; - $this->ruleGroupRepository->setUser($user); - $this->ruleGroups = $this->ruleGroupRepository->getActiveGroups(); - } - - /** - * @param TransactionJournal $transactionJournal - */ - public function processTransactionJournal(TransactionJournal $transactionJournal): void - { - Log::debug(sprintf('Will process transaction journal #%d ("%s")', $transactionJournal->id, $transactionJournal->description)); - /** @var RuleGroup $group */ - foreach ($this->ruleGroups as $group) { - Log::debug(sprintf('Now at rule group #%d', $group->id)); - $groupTriggered = false; - /** @var Rule $rule */ - foreach ($group->rules as $rule) { - Log::debug(sprintf('Now at rule #%d from rule group #%d', $rule->id, $group->id)); - $ruleTriggered = false; - // if in rule selection, or group in selection or all rules, it's included. - if ($this->includeRule($rule)) { - Log::debug(sprintf('Rule #%d is included.', $rule->id)); - /** @var Processor $processor */ - $processor = app(Processor::class); - $ruleTriggered = false; - try { - $processor->make($rule, true); - $ruleTriggered = $processor->handleTransactionJournal($transactionJournal); - } catch (FireflyException $e) { - Log::error($e->getMessage()); - } - - if ($ruleTriggered) { - Log::debug('The rule was triggered, so the group is as well!'); - $groupTriggered = true; - } - } - if (!$this->includeRule($rule)) { - Log::debug(sprintf('Rule #%d is not included.', $rule->id)); - } - - // if the rule is triggered and stop processing is true, cancel the entire group. - if ($ruleTriggered && $rule->stop_processing) { - Log::info(sprintf('Break out group #%d because rule #%d was triggered.', $group->id, $rule->id)); - break; - } - } - // if group is triggered and stop processing is true, cancel the whole thing. - if ($groupTriggered && $group->stop_processing) { - Log::info(sprintf('Break out ALL because group #%d was triggered.', $group->id)); - break; - } - } - Log::debug('Done processing this transaction journal.'); - } - /** * @param array $journal */ @@ -212,8 +123,96 @@ class RuleEngine Log::debug('Done processing this transaction journal.'); } + /** + * @param TransactionJournal $transactionJournal + */ + public function processTransactionJournal(TransactionJournal $transactionJournal): void + { + Log::debug(sprintf('Will process transaction journal #%d ("%s")', $transactionJournal->id, $transactionJournal->description)); + /** @var RuleGroup $group */ + foreach ($this->ruleGroups as $group) { + Log::debug(sprintf('Now at rule group #%d', $group->id)); + $groupTriggered = false; + /** @var Rule $rule */ + foreach ($group->rules as $rule) { + Log::debug(sprintf('Now at rule #%d from rule group #%d', $rule->id, $group->id)); + $ruleTriggered = false; + // if in rule selection, or group in selection or all rules, it's included. + if ($this->includeRule($rule)) { + Log::debug(sprintf('Rule #%d is included.', $rule->id)); + /** @var Processor $processor */ + $processor = app(Processor::class); + $ruleTriggered = false; + try { + $processor->make($rule, true); + $ruleTriggered = $processor->handleTransactionJournal($transactionJournal); + } catch (FireflyException $e) { + Log::error($e->getMessage()); + } + + if ($ruleTriggered) { + Log::debug('The rule was triggered, so the group is as well!'); + $groupTriggered = true; + } + } + if (!$this->includeRule($rule)) { + Log::debug(sprintf('Rule #%d is not included.', $rule->id)); + } + + // if the rule is triggered and stop processing is true, cancel the entire group. + if ($ruleTriggered && $rule->stop_processing) { + Log::info(sprintf('Break out group #%d because rule #%d was triggered.', $group->id, $rule->id)); + break; + } + } + // if group is triggered and stop processing is true, cancel the whole thing. + if ($groupTriggered && $group->stop_processing) { + Log::info(sprintf('Break out ALL because group #%d was triggered.', $group->id)); + break; + } + } + Log::debug('Done processing this transaction journal.'); + } + + /** + * @param bool $allRules + */ + public function setAllRules(bool $allRules): void + { + Log::debug('RuleEngine will apply ALL rules.'); + $this->allRules = $allRules; + } + + /** + * @param array $rulesToApply + */ + public function setRulesToApply(array $rulesToApply): void + { + Log::debug('RuleEngine will try rules', $rulesToApply); + $this->rulesToApply = $rulesToApply; + } + + /** + * @param int $triggerMode + */ + public function setTriggerMode(int $triggerMode): void + { + $this->triggerMode = $triggerMode; + } + + /** + * @param User $user + */ + public function setUser(User $user): void + { + $this->user = $user; + $this->ruleGroupRepository->setUser($user); + $this->ruleGroups = $this->ruleGroupRepository->getActiveGroups(); + } + /** * @param Rule $rule + * * @return bool */ private function includeRule(Rule $rule): bool @@ -224,8 +223,8 @@ class RuleEngine return false; } - $validTrigger = ('store-journal' === $trigger->trigger_value && self::TRIGGER_STORE === $this->triggerMode) || - ('update-journal' === $trigger->trigger_value && self::TRIGGER_UPDATE === $this->triggerMode); + $validTrigger = ('store-journal' === $trigger->trigger_value && self::TRIGGER_STORE === $this->triggerMode) + || ('update-journal' === $trigger->trigger_value && self::TRIGGER_UPDATE === $this->triggerMode); return $validTrigger && ($this->allRules || in_array($rule->id, $this->rulesToApply, true)); } diff --git a/app/TransactionRules/Factory/TriggerFactory.php b/app/TransactionRules/Factory/TriggerFactory.php index 4d5c10e69e..9af587d3c9 100644 --- a/app/TransactionRules/Factory/TriggerFactory.php +++ b/app/TransactionRules/Factory/TriggerFactory.php @@ -78,11 +78,11 @@ class TriggerFactory * @param string $triggerValue * @param bool $stopProcessing * - * @see TriggerFactory::getTrigger - * * @return AbstractTrigger * * @throws FireflyException + * @see TriggerFactory::getTrigger + * */ public static function makeTriggerFromStrings(string $triggerType, string $triggerValue, bool $stopProcessing): AbstractTrigger { diff --git a/app/TransactionRules/Processor.php b/app/TransactionRules/Processor.php index e57a655801..225de82a3d 100644 --- a/app/TransactionRules/Processor.php +++ b/app/TransactionRules/Processor.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Rule; use FireflyIII\Models\RuleAction; use FireflyIII\Models\RuleTrigger; @@ -62,16 +63,71 @@ class Processor $this->actions = new Collection; } + /** + * Return found triggers + * + * @return int + */ + public function getFoundTriggers(): int + { + return $this->foundTriggers; + } + + /** + * Set found triggers + * + * @param int $foundTriggers + */ + public function setFoundTriggers(int $foundTriggers): void + { + $this->foundTriggers = $foundTriggers; + } + /** * Returns the rule * - * @return \FireflyIII\Models\Rule + * @return Rule */ public function getRule(): Rule { return $this->rule; } + /** + * This method will scan the given transaction journal and check if it matches the triggers found in the Processor + * If so, it will also attempt to run the given actions on the journal. It returns a bool indicating if the transaction journal + * matches all of the triggers (regardless of whether the Processor could act on it). + * + * @param array $journal + * + * @return bool + * @throws FireflyException + */ + public function handleJournalArray(array $journal): bool + { + + Log::debug(sprintf('handleJournalArray for journal #%d (group #%d)', $journal['transaction_journal_id'], $journal['transaction_group_id'])); + + // grab the actual journal. + $this->journal = TransactionJournal::find($journal['transaction_journal_id']); + // get all triggers: + $triggered = $this->triggered(); + if ($triggered) { + Log::debug('Rule is triggered, go to actions.'); + if ($this->actions->count() > 0) { + Log::debug('Has more than zero actions.'); + $this->actions(); + } + if (0 === $this->actions->count()) { + Log::info('Rule has no actions!'); + } + + return true; + } + + return false; + } + /** * This method will scan the given transaction journal and check if it matches the triggers found in the Processor * If so, it will also attempt to run the given actions on the journal. It returns a bool indicating if the transaction journal @@ -80,7 +136,7 @@ class Processor * @param Transaction $transaction * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function handleTransaction(Transaction $transaction): bool { @@ -107,6 +163,140 @@ class Processor return false; } + /** + * This method will scan the given transaction journal and check if it matches the triggers found in the Processor + * If so, it will also attempt to run the given actions on the journal. It returns a bool indicating if the transaction journal + * matches all of the triggers (regardless of whether the Processor could act on it). + * + * @param TransactionJournal $journal + * + * @return bool + * @throws FireflyException + */ + public function handleTransactionJournal(TransactionJournal $journal): bool + { + Log::debug(sprintf('handleTransactionJournal for journal %d', $journal->id)); + $this->journal = $journal; + // get all triggers: + $triggered = $this->triggered(); + if ($triggered) { + if ($this->actions->count() > 0) { + $this->actions(); + } + + return true; + } + + return false; + } + + /** + * @return bool + */ + public function isStrict(): bool + { + return $this->strict; + } + + /** + * @param bool $strict + */ + public function setStrict(bool $strict): void + { + $this->strict = $strict; + } + + /** + * This method will make a Processor that will process each transaction journal using the triggers + * and actions found in the given Rule. + * + * @param Rule $rule + * @param bool $includeActions + * + * @throws FireflyException + */ + public function make(Rule $rule, bool $includeActions = null): void + { + $includeActions = $includeActions ?? true; + Log::debug(sprintf('Making new rule from Rule %d', $rule->id)); + Log::debug(sprintf('Rule is strict: %s', var_export($rule->strict, true))); + $this->rule = $rule; + $this->strict = $rule->strict; + $triggerSet = $rule->ruleTriggers()->orderBy('order', 'ASC')->get(); + /** @var RuleTrigger $trigger */ + foreach ($triggerSet as $trigger) { + Log::debug(sprintf('Push trigger %d', $trigger->id)); + $this->triggers->push(TriggerFactory::getTrigger($trigger)); + } + if (true === $includeActions) { + $this->actions = $rule->ruleActions()->orderBy('order', 'ASC')->get(); + } + } + + /** + * This method will make a Processor that will process each transaction journal using the given + * trigger (singular!). It can only report if the transaction journal was hit by the given trigger + * and will not be able to act on it using actions. + * + * @param string $triggerName + * @param string $triggerValue + * + * @throws FireflyException + */ + public function makeFromString(string $triggerName, string $triggerValue): void + { + Log::debug(sprintf('Processor::makeFromString("%s", "%s")', $triggerName, $triggerValue)); + $trigger = TriggerFactory::makeTriggerFromStrings($triggerName, $triggerValue, false); + $this->triggers->push($trigger); + } + + /** + * This method will make a Processor that will process each transaction journal using the given + * triggers. It can only report if the transaction journal was hit by the given triggers + * and will not be able to act on it using actions. + * + * The given triggers must be in the following format: + * + * [type => xx, value => yy, stop_processing => bool], [type => xx, value => yy, stop_processing => bool], + * + * @param array $triggers + * + * @throws FireflyException + */ + public function makeFromStringArray(array $triggers): void + { + foreach ($triggers as $entry) { + $entry['value'] = $entry['value'] ?? ''; + $trigger = TriggerFactory::makeTriggerFromStrings($entry['type'], $entry['value'], $entry['stop_processing']); + $this->triggers->push($trigger); + } + + } + + /** + * Run the actions + * + * @return void + * @throws FireflyException + */ + private function actions(): void + { + /** + * @var int + * @var RuleAction $action + */ + foreach ($this->actions as $action) { + /** @var ActionInterface $actionClass */ + $actionClass = ActionFactory::getAction($action); + Log::debug(sprintf('Fire action %s on journal #%d', get_class($actionClass), $this->journal->id)); + $actionClass->act($this->journal); + if ($action->stop_processing) { + Log::debug('Stop processing now and break.'); + break; + } + } + } + /** * Method to check whether the current transaction would be triggered * by the given list of triggers. @@ -147,193 +337,4 @@ class Processor return $result; } - - /** - * Return found triggers - * - * @return int - */ - public function getFoundTriggers(): int - { - return $this->foundTriggers; - } - - /** - * Set found triggers - * - * @param int $foundTriggers - */ - public function setFoundTriggers(int $foundTriggers): void - { - $this->foundTriggers = $foundTriggers; - } - - /** - * Run the actions - * - * @return void - * @throws \FireflyIII\Exceptions\FireflyException - */ - private function actions(): void - { - /** - * @var int - * @var RuleAction $action - */ - foreach ($this->actions as $action) { - /** @var ActionInterface $actionClass */ - $actionClass = ActionFactory::getAction($action); - Log::debug(sprintf('Fire action %s on journal #%d', get_class($actionClass), $this->journal->id)); - $actionClass->act($this->journal); - if ($action->stop_processing) { - Log::debug('Stop processing now and break.'); - break; - } - } - } - - /** - * This method will scan the given transaction journal and check if it matches the triggers found in the Processor - * If so, it will also attempt to run the given actions on the journal. It returns a bool indicating if the transaction journal - * matches all of the triggers (regardless of whether the Processor could act on it). - * - * @param array $journal - * - * @return bool - * @throws \FireflyIII\Exceptions\FireflyException - */ - public function handleJournalArray(array $journal): bool - { - - Log::debug(sprintf('handleJournalArray for journal #%d (group #%d)', $journal['transaction_journal_id'], $journal['transaction_group_id'])); - - // grab the actual journal. - $this->journal = TransactionJournal::find($journal['transaction_journal_id']); - // get all triggers: - $triggered = $this->triggered(); - if ($triggered) { - Log::debug('Rule is triggered, go to actions.'); - if ($this->actions->count() > 0) { - Log::debug('Has more than zero actions.'); - $this->actions(); - } - if (0 === $this->actions->count()) { - Log::info('Rule has no actions!'); - } - - return true; - } - - return false; - } - - /** - * This method will scan the given transaction journal and check if it matches the triggers found in the Processor - * If so, it will also attempt to run the given actions on the journal. It returns a bool indicating if the transaction journal - * matches all of the triggers (regardless of whether the Processor could act on it). - * - * @param TransactionJournal $journal - * - * @return bool - * @throws \FireflyIII\Exceptions\FireflyException - */ - public function handleTransactionJournal(TransactionJournal $journal): bool - { - Log::debug(sprintf('handleTransactionJournal for journal %d', $journal->id)); - $this->journal = $journal; - // get all triggers: - $triggered = $this->triggered(); - if ($triggered) { - if ($this->actions->count() > 0) { - $this->actions(); - } - - return true; - } - - return false; - } - - /** - * @return bool - */ - public function isStrict(): bool - { - return $this->strict; - } - - /** - * @param bool $strict - */ - public function setStrict(bool $strict): void - { - $this->strict = $strict; - } - - /** - * This method will make a Processor that will process each transaction journal using the triggers - * and actions found in the given Rule. - * - * @param Rule $rule - * @param bool $includeActions - * - * @throws \FireflyIII\Exceptions\FireflyException - */ - public function make(Rule $rule, bool $includeActions = null): void - { - $includeActions = $includeActions ?? true; - Log::debug(sprintf('Making new rule from Rule %d', $rule->id)); - Log::debug(sprintf('Rule is strict: %s', var_export($rule->strict, true))); - $this->rule = $rule; - $this->strict = $rule->strict; - $triggerSet = $rule->ruleTriggers()->orderBy('order', 'ASC')->get(); - /** @var RuleTrigger $trigger */ - foreach ($triggerSet as $trigger) { - Log::debug(sprintf('Push trigger %d', $trigger->id)); - $this->triggers->push(TriggerFactory::getTrigger($trigger)); - } - if (true === $includeActions) { - $this->actions = $rule->ruleActions()->orderBy('order', 'ASC')->get(); - } - } - - /** - * This method will make a Processor that will process each transaction journal using the given - * trigger (singular!). It can only report if the transaction journal was hit by the given trigger - * and will not be able to act on it using actions. - * - * @param string $triggerName - * @param string $triggerValue - * - * @throws \FireflyIII\Exceptions\FireflyException - */ - public function makeFromString(string $triggerName, string $triggerValue): void - { - Log::debug(sprintf('Processor::makeFromString("%s", "%s")', $triggerName, $triggerValue)); - $trigger = TriggerFactory::makeTriggerFromStrings($triggerName, $triggerValue, false); - $this->triggers->push($trigger); - } - - /** - * This method will make a Processor that will process each transaction journal using the given - * triggers. It can only report if the transaction journal was hit by the given triggers - * and will not be able to act on it using actions. - * - * The given triggers must be in the following format: - * - * [type => xx, value => yy, stop_processing => bool], [type => xx, value => yy, stop_processing => bool], - * - * @param array $triggers - * - * @throws \FireflyIII\Exceptions\FireflyException - */ - public function makeFromStringArray(array $triggers): void - { - foreach ($triggers as $entry) { - $entry['value'] = $entry['value'] ?? ''; - $trigger = TriggerFactory::makeTriggerFromStrings($entry['type'], $entry['value'], $entry['stop_processing']); - $this->triggers->push($trigger); - } - - } } diff --git a/app/TransactionRules/TransactionMatcher.php b/app/TransactionRules/TransactionMatcher.php index ce7c532bbc..34c45143d6 100644 --- a/app/TransactionRules/TransactionMatcher.php +++ b/app/TransactionRules/TransactionMatcher.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Models\Rule; use FireflyIII\Models\RuleTrigger; @@ -78,7 +79,7 @@ class TransactionMatcher * triggers onto each transaction journal until enough matches are found ($limit). * * @return array - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function findTransactionsByRule(): array { @@ -108,7 +109,7 @@ class TransactionMatcher * triggers onto each transaction journal until enough matches are found ($limit). * * @return array - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function findTransactionsByTriggers(): array { diff --git a/app/Transformers/BillTransformer.php b/app/Transformers/BillTransformer.php index 84a4a8fe67..6f469b8824 100644 --- a/app/Transformers/BillTransformer.php +++ b/app/Transformers/BillTransformer.php @@ -127,7 +127,7 @@ class BillTransformer extends AbstractTransformer * @param Bill $bill * @param Carbon $date * - * @return \Carbon\Carbon + * @return Carbon */ protected function nextDateMatch(Bill $bill, Carbon $date): Carbon { diff --git a/app/Transformers/CategoryTransformer.php b/app/Transformers/CategoryTransformer.php index 5f771b7aae..794fc4fc25 100644 --- a/app/Transformers/CategoryTransformer.php +++ b/app/Transformers/CategoryTransformer.php @@ -24,10 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; -use Carbon\Carbon; use FireflyIII\Models\Category; -use FireflyIII\Models\Transaction; -use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use Illuminate\Support\Collection; use Log; diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index 0da6a0117d..1f9206d5c1 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -46,8 +46,6 @@ use Illuminate\Validation\Validator; class FireflyValidator extends Validator { /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @@ -65,8 +63,6 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @param $parameters @@ -86,8 +82,6 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @@ -108,8 +102,6 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @@ -191,8 +183,6 @@ class FireflyValidator extends Validator * @param $attribute * @param $value * @param $parameters - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @return bool */ public function validateLess($attribute, $value, $parameters): bool @@ -207,8 +197,6 @@ class FireflyValidator extends Validator * @param $attribute * @param $value * @param $parameters - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @return bool */ public function validateMore($attribute, $value, $parameters): bool @@ -220,8 +208,6 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @param $parameters @@ -381,8 +367,6 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @param $parameters @@ -415,8 +399,6 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @param $parameters @@ -452,7 +434,7 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * * Validate an object and its unicity. Checks for encryption / encrypted values as well. * * parameter 0: the table @@ -496,8 +478,6 @@ class FireflyValidator extends Validator } /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * * @param $attribute * @param $value * @param $parameters From 342985d52ab1257008d09581b6036aaffe24267c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:47:51 +0200 Subject: [PATCH 55/65] Code cleanup --- database/factories/AccountFactory.php | 1 - database/factories/ModelFactory.php | 3 ++- database/factories/UserFactory.php | 1 + .../2016_12_28_203205_changes_for_v431.php | 11 ++++++----- ...8_01_01_000001_create_oauth_auth_codes_table.php | 1 + ...1_01_000002_create_oauth_access_tokens_table.php | 1 + ..._01_000003_create_oauth_refresh_tokens_table.php | 1 + ...2018_01_01_000004_create_oauth_clients_table.php | 1 + ...5_create_oauth_personal_access_clients_table.php | 1 + .../2018_03_19_141348_changes_for_v472.php | 1 + .../2018_04_07_210913_changes_for_v473.php | 1 + .../2018_04_29_174524_changes_for_v474.php | 2 ++ .../2018_06_08_200526_changes_for_v475.php | 2 ++ .../2018_09_05_195147_changes_for_v477.php | 3 ++- .../2018_11_06_172532_changes_for_v479.php | 2 ++ .../2019_01_28_193833_changes_for_v4710.php | 3 ++- .../2019_02_05_055516_changes_for_v4711.php | 4 +++- .../2019_02_11_170529_changes_for_v4712.php | 1 + .../2019_03_11_223700_fix_ldap_configuration.php | 1 + .../2019_03_22_183214_changes_for_v480.php | 13 +++++++++---- database/seeds/AccountTypeSeeder.php | 2 +- database/seeds/TransactionCurrencySeeder.php | 6 +++++- 22 files changed, 46 insertions(+), 16 deletions(-) diff --git a/database/factories/AccountFactory.php b/database/factories/AccountFactory.php index a48207abdf..1601c82d16 100644 --- a/database/factories/AccountFactory.php +++ b/database/factories/AccountFactory.php @@ -23,7 +23,6 @@ declare(strict_types=1); use Carbon\Carbon; - $factory->define( FireflyIII\Models\Account::class, function (Faker\Generator $faker) { diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 936dc2d38e..97018e321b 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -21,6 +21,7 @@ declare(strict_types=1); use Carbon\Carbon; +use FireflyIII\Models\TransactionJournal; $factory->define( @@ -29,7 +30,7 @@ $factory->define( return [ 'user_id' => 1, 'attachable_id' => 1, - 'attachable_type' => \FireflyIII\Models\TransactionJournal::class, + 'attachable_type' => TransactionJournal::class, 'md5' => md5($faker->words(6, true)), 'mime' => 'text/plain', 'size' => 1, diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index ad3dc9dc58..6b0f9fcbe8 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -21,6 +21,7 @@ */ declare(strict_types=1); + /** * UserFactory.php * Copyright (c) 2018 thegrumpydictator@gmail.com diff --git a/database/migrations/2016_12_28_203205_changes_for_v431.php b/database/migrations/2016_12_28_203205_changes_for_v431.php index 1d276d6cee..c2e38429da 100644 --- a/database/migrations/2016_12_28_203205_changes_for_v431.php +++ b/database/migrations/2016_12_28_203205_changes_for_v431.php @@ -75,13 +75,14 @@ class ChangesForV431 extends Migration * Run the migrations. * * @SuppressWarnings(PHPMD.ShortMethodName) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function up(): void { // add decimal places to "transaction currencies". Schema::table( 'transaction_currencies', - function (Blueprint $table) { + static function (Blueprint $table) { $table->smallInteger('decimal_places', false, true)->default(2); } ); @@ -89,7 +90,7 @@ class ChangesForV431 extends Migration // change field "startdate" to "start_date" Schema::table( 'budget_limits', - function (Blueprint $table) { + static function (Blueprint $table) { $table->renameColumn('startdate', 'start_date'); } ); @@ -97,7 +98,7 @@ class ChangesForV431 extends Migration // add date field "end_date" after "start_date" Schema::table( 'budget_limits', - function (Blueprint $table) { + static function (Blueprint $table) { $table->date('end_date')->nullable()->after('start_date'); } ); @@ -105,13 +106,13 @@ class ChangesForV431 extends Migration // drop "repeats" and "repeat_freq". Schema::table( 'budget_limits', - function (Blueprint $table) { + static function (Blueprint $table) { $table->dropColumn('repeats'); } ); Schema::table( 'budget_limits', - function (Blueprint $table) { + static function (Blueprint $table) { $table->dropColumn('repeat_freq'); } ); diff --git a/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php index 4d88023dc6..267a06ad60 100644 --- a/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php +++ b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php @@ -41,6 +41,7 @@ class CreateOauthAuthCodesTable extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function up(): void { diff --git a/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php index 47101b5a2e..4053b05755 100644 --- a/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php +++ b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php @@ -41,6 +41,7 @@ class CreateOauthAccessTokensTable extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function up(): void { diff --git a/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php index b154666881..3c4d530283 100644 --- a/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php +++ b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php @@ -41,6 +41,7 @@ class CreateOauthRefreshTokensTable extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function up(): void { diff --git a/database/migrations/2018_01_01_000004_create_oauth_clients_table.php b/database/migrations/2018_01_01_000004_create_oauth_clients_table.php index 16c5bc6c87..1a6ceec6b8 100644 --- a/database/migrations/2018_01_01_000004_create_oauth_clients_table.php +++ b/database/migrations/2018_01_01_000004_create_oauth_clients_table.php @@ -41,6 +41,7 @@ class CreateOauthClientsTable extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function up(): void { diff --git a/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php index 73e26aff39..2e3db54ff2 100644 --- a/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php +++ b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php @@ -42,6 +42,7 @@ class CreateOauthPersonalAccessClientsTable extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) */ public function up(): void { diff --git a/database/migrations/2018_03_19_141348_changes_for_v472.php b/database/migrations/2018_03_19_141348_changes_for_v472.php index abb3afe3ed..c116a65207 100644 --- a/database/migrations/2018_03_19_141348_changes_for_v472.php +++ b/database/migrations/2018_03_19_141348_changes_for_v472.php @@ -53,6 +53,7 @@ class ChangesForV472 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ diff --git a/database/migrations/2018_04_07_210913_changes_for_v473.php b/database/migrations/2018_04_07_210913_changes_for_v473.php index 3ebbb5fe6c..a9813b2da0 100644 --- a/database/migrations/2018_04_07_210913_changes_for_v473.php +++ b/database/migrations/2018_04_07_210913_changes_for_v473.php @@ -61,6 +61,7 @@ class ChangesForV473 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ diff --git a/database/migrations/2018_04_29_174524_changes_for_v474.php b/database/migrations/2018_04_29_174524_changes_for_v474.php index d9c2598cd7..d68542d6f8 100644 --- a/database/migrations/2018_04_29_174524_changes_for_v474.php +++ b/database/migrations/2018_04_29_174524_changes_for_v474.php @@ -32,6 +32,7 @@ class ChangesForV474 extends Migration { /** * Reverse the migrations. + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * * @return void */ @@ -92,6 +93,7 @@ class ChangesForV474 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ diff --git a/database/migrations/2018_06_08_200526_changes_for_v475.php b/database/migrations/2018_06_08_200526_changes_for_v475.php index 003c556ea4..5a5e1a0acc 100644 --- a/database/migrations/2018_06_08_200526_changes_for_v475.php +++ b/database/migrations/2018_06_08_200526_changes_for_v475.php @@ -47,6 +47,8 @@ class ChangesForV475 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * * @return void */ diff --git a/database/migrations/2018_09_05_195147_changes_for_v477.php b/database/migrations/2018_09_05_195147_changes_for_v477.php index 6aae743150..67777c6733 100644 --- a/database/migrations/2018_09_05_195147_changes_for_v477.php +++ b/database/migrations/2018_09_05_195147_changes_for_v477.php @@ -41,7 +41,7 @@ class ChangesForV477 extends Migration Schema::table( 'budget_limits', function (Blueprint $table) { - // cannot drop foreign keys in SQLite: + // cannot drop foreign keys in SQLite: if ('sqlite' !== config('database.default')) { $table->dropForeign('budget_limits_transaction_currency_id_foreign'); } @@ -53,6 +53,7 @@ class ChangesForV477 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ diff --git a/database/migrations/2018_11_06_172532_changes_for_v479.php b/database/migrations/2018_11_06_172532_changes_for_v479.php index 9846f38f0a..a0498d5b36 100644 --- a/database/migrations/2018_11_06_172532_changes_for_v479.php +++ b/database/migrations/2018_11_06_172532_changes_for_v479.php @@ -21,6 +21,7 @@ */ declare(strict_types=1); + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; @@ -45,6 +46,7 @@ class ChangesForV479 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ diff --git a/database/migrations/2019_01_28_193833_changes_for_v4710.php b/database/migrations/2019_01_28_193833_changes_for_v4710.php index cce324b8c1..35326ec98d 100644 --- a/database/migrations/2019_01_28_193833_changes_for_v4710.php +++ b/database/migrations/2019_01_28_193833_changes_for_v4710.php @@ -41,6 +41,7 @@ class ChangesForV4710 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ @@ -73,7 +74,7 @@ class ChangesForV4710 extends Migration $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade'); // unique combi: - $table->unique(['transaction_group_id', 'transaction_journal_id'],'unique_in_group'); + $table->unique(['transaction_group_id', 'transaction_journal_id'], 'unique_in_group'); } ); } diff --git a/database/migrations/2019_02_05_055516_changes_for_v4711.php b/database/migrations/2019_02_05_055516_changes_for_v4711.php index c05b293ac2..3a9f3a385a 100644 --- a/database/migrations/2019_02_05_055516_changes_for_v4711.php +++ b/database/migrations/2019_02_05_055516_changes_for_v4711.php @@ -40,6 +40,7 @@ class ChangesForV4711 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ @@ -59,7 +60,8 @@ class ChangesForV4711 extends Migration } ); - Schema::table('preferences', function (Blueprint $table) { + Schema::table( + 'preferences', function (Blueprint $table) { $table->text('data')->nullable()->change(); } ); diff --git a/database/migrations/2019_02_11_170529_changes_for_v4712.php b/database/migrations/2019_02_11_170529_changes_for_v4712.php index ad4371e711..2ae6b437ab 100644 --- a/database/migrations/2019_02_11_170529_changes_for_v4712.php +++ b/database/migrations/2019_02_11_170529_changes_for_v4712.php @@ -42,6 +42,7 @@ class ChangesForV4712 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ diff --git a/database/migrations/2019_03_11_223700_fix_ldap_configuration.php b/database/migrations/2019_03_11_223700_fix_ldap_configuration.php index 008a67de41..f1f5f04dd8 100644 --- a/database/migrations/2019_03_11_223700_fix_ldap_configuration.php +++ b/database/migrations/2019_03_11_223700_fix_ldap_configuration.php @@ -46,6 +46,7 @@ class FixLdapConfiguration extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ diff --git a/database/migrations/2019_03_22_183214_changes_for_v480.php b/database/migrations/2019_03_22_183214_changes_for_v480.php index 21d19891c5..62f458f358 100644 --- a/database/migrations/2019_03_22_183214_changes_for_v480.php +++ b/database/migrations/2019_03_22_183214_changes_for_v480.php @@ -47,9 +47,11 @@ class ChangesForV480 extends Migration $table->dropColumn('transaction_group_id'); } ); - Schema::table('rule_groups', static function (Blueprint $table) { + Schema::table( + 'rule_groups', static function (Blueprint $table) { $table->dropColumn('stop_processing'); - }); + } + ); Schema::table( 'users', static function (Blueprint $table) { @@ -60,6 +62,7 @@ class ChangesForV480 extends Migration /** * Run the migrations. + * @SuppressWarnings(PHPMD.ShortMethodName) * * @return void */ @@ -80,9 +83,11 @@ class ChangesForV480 extends Migration $table->foreign('transaction_group_id')->references('id')->on('transaction_groups')->onDelete('cascade'); } ); - Schema::table('rule_groups', static function (Blueprint $table) { + Schema::table( + 'rule_groups', static function (Blueprint $table) { $table->boolean('stop_processing')->default(false); - }); + } + ); Schema::table( 'users', static function (Blueprint $table) { $table->string('mfa_secret', 50)->nullable(); diff --git a/database/seeds/AccountTypeSeeder.php b/database/seeds/AccountTypeSeeder.php index 2231fce92d..8755f50bd1 100644 --- a/database/seeds/AccountTypeSeeder.php +++ b/database/seeds/AccountTypeSeeder.php @@ -42,7 +42,7 @@ class AccountTypeSeeder extends Seeder AccountType::LOAN, AccountType::RECONCILIATION, AccountType::DEBT, - AccountType::MORTGAGE + AccountType::MORTGAGE, ]; foreach ($types as $type) { try { diff --git a/database/seeds/TransactionCurrencySeeder.php b/database/seeds/TransactionCurrencySeeder.php index 0a49b642ab..cd5a57ad3c 100644 --- a/database/seeds/TransactionCurrencySeeder.php +++ b/database/seeds/TransactionCurrencySeeder.php @@ -28,11 +28,15 @@ use Illuminate\Database\Seeder; */ class TransactionCurrencySeeder extends Seeder { + /** + * @SuppressWarnings(PHPMD.ShortMethodName) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ public function run() { $currencies = []; // european currencies - $currencies[] = ['code' => 'EUR', 'name' => 'Euro', 'symbol' => '€', 'decimal_places' => 2,'enabled' => 1]; + $currencies[] = ['code' => 'EUR', 'name' => 'Euro', 'symbol' => '€', 'decimal_places' => 2, 'enabled' => 1]; $currencies[] = ['code' => 'HUF', 'name' => 'Hungarian forint', 'symbol' => 'Ft', 'decimal_places' => 2]; $currencies[] = ['code' => 'GBP', 'name' => 'British Pound', 'symbol' => '£', 'decimal_places' => 2]; $currencies[] = ['code' => 'UAH', 'name' => 'Ukrainian hryvnia', 'symbol' => '₴', 'decimal_places' => 2]; From c235e42d6c2fd50043fcabc3c6cbbfe13031fdf3 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:48:09 +0200 Subject: [PATCH 56/65] Bill report URL must be set. --- resources/views/v1/reports/default/multi-year.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/v1/reports/default/multi-year.twig b/resources/views/v1/reports/default/multi-year.twig index 01a026544f..1e842aca29 100644 --- a/resources/views/v1/reports/default/multi-year.twig +++ b/resources/views/v1/reports/default/multi-year.twig @@ -226,6 +226,7 @@ var budgetPeriodReportUri = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryExpenseUri = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var categoryIncomeUri = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var billReportUri = ''; From 1974d5f1e34c0e70b23b9e88a59eb2363b7a8923 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:48:28 +0200 Subject: [PATCH 57/65] Code cleanup --- tests/Api/V1/Controllers/Chart/AccountControllerTest.php | 3 +++ .../V1/Controllers/Chart/AvailableBudgetControllerTest.php | 3 +++ tests/Api/V1/Controllers/Chart/CategoryControllerTest.php | 3 +++ tests/CreatesApplication.php | 3 +++ tests/Feature/Controllers/Account/CreateControllerTest.php | 3 ++- tests/Feature/Controllers/Account/DeleteControllerTest.php | 3 ++- tests/Feature/Controllers/Account/EditControllerTest.php | 3 ++- tests/Feature/Controllers/Account/IndexControllerTest.php | 3 ++- .../Controllers/Account/ReconcileControllerTest.php | 5 +++-- tests/Feature/Controllers/Account/ShowControllerTest.php | 3 ++- .../Controllers/Admin/ConfigurationControllerTest.php | 4 ++++ tests/Feature/Controllers/Admin/HomeControllerTest.php | 4 ++++ tests/Feature/Controllers/Admin/UpdateControllerTest.php | 4 ++++ tests/Feature/Controllers/Admin/UserControllerTest.php | 3 +++ tests/Feature/Controllers/Auth/TwoFactorControllerTest.php | 3 +++ tests/Feature/Controllers/Budget/AmountControllerTest.php | 3 +++ tests/Feature/Controllers/Budget/CreateControllerTest.php | 3 +++ tests/Feature/Controllers/Budget/DeleteControllerTest.php | 3 +++ tests/Feature/Controllers/Budget/EditControllerTest.php | 3 +++ .../Feature/Controllers/Category/CreateControllerTest.php | 3 +++ .../Feature/Controllers/Category/DeleteControllerTest.php | 3 +++ tests/Feature/Controllers/Category/EditControllerTest.php | 3 +++ tests/Feature/Controllers/Category/IndexControllerTest.php | 3 +++ tests/Feature/Controllers/Chart/BillControllerTest.php | 3 +++ tests/Feature/Controllers/Chart/BudgetControllerTest.php | 3 +++ .../Controllers/Chart/BudgetReportControllerTest.php | 3 +++ .../Controllers/Chart/CategoryReportControllerTest.php | 3 +++ .../Controllers/Chart/ExpenseReportControllerTest.php | 3 +++ .../Feature/Controllers/Chart/PiggyBankControllerTest.php | 3 +++ tests/Feature/Controllers/Chart/ReportControllerTest.php | 3 +++ .../Feature/Controllers/Chart/TagReportControllerTest.php | 3 +++ .../Feature/Controllers/Import/CallbackControllerTest.php | 3 +++ .../Controllers/Import/JobConfigurationControllerTest.php | 3 +++ .../Controllers/Json/AutoCompleteControllerTest.php | 3 +++ tests/Feature/Controllers/Json/BoxControllerTest.php | 3 +++ tests/Feature/Controllers/Json/ReconcileControllerTest.php | 3 +++ .../Feature/Controllers/Json/RecurrenceControllerTest.php | 3 +++ .../Feature/Controllers/Recurring/CreateControllerTest.php | 2 ++ .../Feature/Controllers/Recurring/DeleteControllerTest.php | 3 +++ tests/Feature/Controllers/Recurring/EditControllerTest.php | 3 +++ .../Feature/Controllers/Recurring/IndexControllerTest.php | 3 +++ tests/Feature/Controllers/Rule/CreateControllerTest.php | 3 +++ tests/Feature/Controllers/Rule/DeleteControllerTest.php | 3 +++ tests/Feature/Controllers/Rule/EditControllerTest.php | 3 +++ tests/Feature/Controllers/Rule/SelectControllerTest.php | 3 +++ .../Feature/Controllers/RuleGroup/CreateControllerTest.php | 3 +++ .../Feature/Controllers/RuleGroup/DeleteControllerTest.php | 3 +++ tests/Feature/Controllers/RuleGroup/EditControllerTest.php | 3 +++ .../Controllers/RuleGroup/ExecutionControllerTest.php | 3 +++ tests/Feature/Controllers/System/CronControllerTest.php | 3 +++ .../Controllers/Transaction/CreateControllerTest.php | 3 +++ .../Feature/Controllers/Transaction/EditControllerTest.php | 3 +++ .../Controllers/Transaction/IndexControllerTest.php | 3 +++ .../Feature/Controllers/Transaction/LinkControllerTest.php | 3 +++ .../Feature/Controllers/Transaction/ShowControllerTest.php | 3 +++ tests/Feature/ExampleTest.php | 3 +++ tests/Object/FakeApiContext.php | 3 +++ tests/TestCase.php | 3 +++ .../Console/Commands/Correction/CreateAccessTokensTest.php | 3 +++ .../Console/Commands/Correction/CreateLinkTypesTest.php | 3 +++ .../Console/Commands/Correction/DeleteEmptyGroupsTest.php | 3 +++ .../Commands/Correction/DeleteEmptyJournalsTest.php | 7 +++++++ .../Commands/Correction/DeleteOrphanedTransactionsTest.php | 3 +++ .../Console/Commands/Correction/DeleteZeroAmountTest.php | 3 +++ .../Console/Commands/Correction/EnableCurrenciesTest.php | 3 +++ .../Console/Commands/Correction/FixAccountTypesTest.php | 3 +++ tests/Unit/Console/Commands/Correction/FixPiggiesTest.php | 3 +++ .../Console/Commands/Correction/FixUnevenAmountTest.php | 3 +++ tests/Unit/Console/Commands/Correction/RemoveBillsTest.php | 3 +++ .../Console/Commands/Correction/RenameMetaFieldsTest.php | 3 +++ .../Console/Commands/Correction/TransferBudgetsTest.php | 3 +++ tests/Unit/Console/Commands/DecryptDatabaseTest.php | 3 +++ tests/Unit/Console/Commands/Import/CreateCSVImportTest.php | 3 +++ .../Console/Commands/Integrity/ReportEmptyObjectsTest.php | 3 +++ tests/Unit/Console/Commands/Integrity/ReportSumTest.php | 3 +++ tests/Unit/Console/Commands/Tools/ApplyRulesTest.php | 3 +++ .../Console/Commands/Upgrade/AccountCurrenciesTest.php | 3 +++ tests/Unit/Console/Commands/Upgrade/BackToJournalsTest.php | 3 +++ .../Console/Commands/Upgrade/BudgetLimitCurrencyTest.php | 3 +++ tests/Unit/Console/Commands/Upgrade/CCLiabilitiesTest.php | 3 +++ .../Console/Commands/Upgrade/MigrateAttachmentsTest.php | 3 +++ .../Console/Commands/Upgrade/MigrateJournalNotesTest.php | 3 +++ .../Unit/Console/Commands/Upgrade/MigrateToGroupsTest.php | 3 +++ tests/Unit/Console/Commands/Upgrade/MigrateToRulesTest.php | 3 +++ .../Commands/Upgrade/OtherCurrenciesCorrectionsTest.php | 3 +++ .../Console/Commands/Upgrade/RenameAccountMetaTest.php | 3 +++ .../Console/Commands/Upgrade/TransactionIdentifierTest.php | 3 +++ .../Commands/Upgrade/TransferCurrenciesCorrectionsTest.php | 3 +++ tests/Unit/ExampleTest.php | 3 +++ tests/Unit/Factory/AccountFactoryTest.php | 2 ++ tests/Unit/Factory/AccountMetaFactoryTest.php | 3 +++ tests/Unit/Factory/AttachmentFactoryTest.php | 3 +++ tests/Unit/Factory/BillFactoryTest.php | 3 +++ tests/Unit/Factory/BudgetFactoryTest.php | 3 +++ tests/Unit/Factory/CategoryFactoryTest.php | 3 +++ tests/Unit/Factory/PiggyBankEventFactoryTest.php | 3 +++ tests/Unit/Factory/PiggyBankFactoryTest.php | 3 +++ tests/Unit/Factory/RecurrenceFactoryTest.php | 2 ++ tests/Unit/Factory/TagFactoryTest.php | 3 +++ tests/Unit/Factory/TransactionCurrencyFactoryTest.php | 3 +++ tests/Unit/Factory/TransactionFactoryTest.php | 3 +++ tests/Unit/Factory/TransactionJournalFactoryTest.php | 3 +++ tests/Unit/Factory/TransactionJournalMetaFactoryTest.php | 3 +++ tests/Unit/Factory/TransactionTypeFactoryTest.php | 3 +++ tests/Unit/Generator/Chart/Basic/ChartJsGeneratorTest.php | 3 +++ .../Generator/Report/Audit/MonthReportGeneratorTest.php | 4 ++++ tests/Unit/Handlers/Events/APIEventHandlerTest.php | 3 +++ tests/Unit/Handlers/Events/AdminEventHandlerTest.php | 3 +++ tests/Unit/Handlers/Events/AutomationHandlerTest.php | 3 +++ tests/Unit/Handlers/Events/StoredGroupEventHandlerTest.php | 3 +++ .../Unit/Handlers/Events/UpdatedGroupEventHandlerTest.php | 3 +++ .../Unit/Handlers/Events/VersionCheckEventHandlerTest.php | 3 +++ tests/Unit/Helpers/Fiscal/FiscalHelperTest.php | 3 +++ tests/Unit/Helpers/Help/HelpTest.php | 3 +++ tests/Unit/Helpers/Report/NetWorthTest.php | 3 +++ tests/Unit/Import/Converter/AmountCreditTest.php | 3 +++ tests/Unit/Import/Converter/AmountDebitTest.php | 3 +++ tests/Unit/Import/Converter/AmountNegatedTest.php | 3 +++ tests/Unit/Import/Converter/AmountTest.php | 3 +++ tests/Unit/Import/Converter/BankDebitCreditTest.php | 3 +++ .../Import/JobConfiguration/BunqJobConfigurationTest.php | 3 +++ .../Import/JobConfiguration/FakeJobConfigurationTest.php | 3 +++ .../Import/JobConfiguration/FileJobConfigurationTest.php | 3 +++ .../Import/JobConfiguration/FinTSJobConfigurationTest.php | 3 +++ .../JobConfiguration/SpectreJobConfigurationTest.php | 3 +++ .../Import/JobConfiguration/YnabJobConfigurationTest.php | 3 +++ tests/Unit/Import/Mapper/AssetAccountIbansTest.php | 3 +++ tests/Unit/Import/Mapper/AssetAccountsTest.php | 3 +++ tests/Unit/Import/Mapper/BillsTest.php | 3 +++ tests/Unit/Import/Mapper/BudgetsTest.php | 3 +++ tests/Unit/Import/Mapper/CategoriesTest.php | 3 +++ tests/Unit/Import/Mapper/OpposingAccountIbansTest.php | 3 +++ tests/Unit/Import/Mapper/OpposingAccountsTest.php | 3 +++ tests/Unit/Import/Mapper/TagsTest.php | 3 +++ tests/Unit/Import/Mapper/TransactionCurrenciesTest.php | 3 +++ tests/Unit/Import/MapperPreProcess/TagsCommaTest.php | 3 +++ tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php | 3 +++ tests/Unit/Import/Prerequisites/BunqPrerequisitesTest.php | 3 +++ tests/Unit/Import/Prerequisites/FakePrerequisitesTest.php | 3 +++ .../Unit/Import/Prerequisites/SpectrePrerequisitesTest.php | 3 +++ tests/Unit/Import/Prerequisites/YnabPrerequisitesTest.php | 3 +++ tests/Unit/Import/Routine/BunqRoutineTest.php | 3 +++ tests/Unit/Import/Routine/FakeRoutineTest.php | 3 +++ tests/Unit/Import/Routine/FileRoutineTest.php | 3 +++ tests/Unit/Import/Routine/FinTSRoutineTest.php | 3 +++ tests/Unit/Import/Routine/SpectreRoutineTest.php | 3 +++ tests/Unit/Import/Routine/YnabRoutineTest.php | 3 +++ tests/Unit/Import/Specifics/AbnAmroDescriptionTest.php | 3 +++ tests/Unit/Import/Specifics/BelfiusTest.php | 3 +++ tests/Unit/Import/Specifics/IngBelgiumTest.php | 3 +++ tests/Unit/Import/Specifics/IngDescriptionTest.php | 3 +++ tests/Unit/Import/Specifics/PresidentsChoiceTest.php | 3 +++ tests/Unit/Import/Specifics/SnsDescriptionTest.php | 3 +++ tests/Unit/Import/Storage/ImportArrayStorageTest.php | 3 +++ tests/Unit/Jobs/CreateRecurringTransactionsTest.php | 3 +++ tests/Unit/Middleware/AuthenticateTest.php | 3 +++ tests/Unit/Middleware/BinderTest.php | 3 +++ tests/Unit/Middleware/IsAdminTest.php | 3 +++ tests/Unit/Middleware/IsDemoUserTest.php | 3 +++ tests/Unit/Middleware/IsSandstormUserTest.php | 3 +++ tests/Unit/Middleware/RangeTest.php | 3 +++ tests/Unit/Middleware/RedirectIfAuthenticatedTest.php | 3 +++ tests/Unit/Middleware/SandstormTest.php | 3 +++ tests/Unit/Middleware/SecureHeadersTest.php | 3 +++ tests/Unit/Rules/BelongsUserTest.php | 3 +++ tests/Unit/Rules/IsAssetAccountIdTest.php | 3 +++ tests/Unit/Rules/IsBooleanTest.php | 3 +++ tests/Unit/Rules/IsDateOrTimeTest.php | 3 +++ tests/Unit/Rules/IsValidAttachmentModelTest.php | 3 +++ tests/Unit/Rules/UniqueIbanTest.php | 3 +++ .../Internal/Destroy/AccountDestroyServiceTest.php | 3 +++ .../Services/Internal/Update/AccountUpdateServiceTest.php | 3 +++ tests/Unit/Support/Cronjobs/RecurringCronjobTest.php | 3 +++ tests/Unit/Support/FinTS/MetadataParserTest.php | 3 +++ .../JobConfiguration/Bunq/ChooseAccountsHandlerTest.php | 3 +++ .../Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php | 3 +++ .../JobConfiguration/File/ConfigureMappingHandlerTest.php | 3 +++ .../JobConfiguration/File/ConfigureRolesHandlerTest.php | 3 +++ .../JobConfiguration/File/ConfigureUploadHandlerTest.php | 3 +++ .../Import/JobConfiguration/File/NewFileJobHandlerTest.php | 3 +++ .../JobConfiguration/Spectre/ChooseAccountsHandlerTest.php | 3 +++ .../JobConfiguration/Spectre/ChooseLoginHandlerTest.php | 3 +++ .../JobConfiguration/Spectre/DoAuthenticateHandlerTest.php | 3 +++ .../Support/Import/Placeholder/ImportTransactionTest.php | 3 +++ .../Import/Routine/Bunq/StageImportDataHandlerTest.php | 3 +++ .../Support/Import/Routine/Bunq/StageNewHandlerTest.php | 3 +++ .../Support/Import/Routine/File/AssetAccountMapperTest.php | 3 +++ .../Unit/Support/Import/Routine/File/CSVProcessorTest.php | 3 +++ .../Support/Import/Routine/File/CurrencyMapperTest.php | 3 +++ .../Import/Routine/File/ImportableConverterTest.php | 3 +++ .../Support/Import/Routine/File/ImportableCreatorTest.php | 3 +++ tests/Unit/Support/Import/Routine/File/LineReaderTest.php | 3 +++ .../Import/Routine/File/MappedValuesValidatorTest.php | 3 +++ .../Support/Import/Routine/File/MappingConvergerTest.php | 3 +++ .../Import/Routine/File/OpposingAccountMapperTest.php | 3 +++ .../Routine/Spectre/StageAuthenticatedHandlerTest.php | 3 +++ .../Import/Routine/Spectre/StageImportDataHandlerTest.php | 3 +++ .../Support/Import/Routine/Spectre/StageNewHandlerTest.php | 3 +++ tests/Unit/Support/NavigationTest.php | 3 +++ tests/Unit/TransactionRules/Actions/AddTagTest.php | 4 ++++ .../TransactionRules/Actions/AppendDescriptionTest.php | 3 +++ tests/Unit/TransactionRules/Actions/AppendNotesTest.php | 3 +++ tests/Unit/TransactionRules/Actions/ClearBudgetTest.php | 3 +++ tests/Unit/TransactionRules/Actions/ClearCategoryTest.php | 3 +++ tests/Unit/TransactionRules/Actions/ClearNotesTest.php | 3 +++ .../Unit/TransactionRules/Actions/ConvertToDepositTest.php | 3 +++ .../TransactionRules/Actions/ConvertToTransferTest.php | 3 +++ .../TransactionRules/Actions/ConvertToWithdrawalTest.php | 3 +++ tests/Unit/TransactionRules/Actions/LinkToBillTest.php | 3 +++ .../TransactionRules/Actions/PrependDescriptionTest.php | 3 +++ tests/Unit/TransactionRules/Actions/PrependNotesTest.php | 3 +++ tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php | 3 +++ tests/Unit/TransactionRules/Actions/RemoveTagTest.php | 3 +++ tests/Unit/TransactionRules/Actions/SetBudgetTest.php | 3 +++ tests/Unit/TransactionRules/Actions/SetCategoryTest.php | 3 +++ tests/Unit/TransactionRules/Actions/SetDescriptionTest.php | 3 +++ .../TransactionRules/Actions/SetDestinationAccountTest.php | 3 +++ tests/Unit/TransactionRules/Actions/SetNotesTest.php | 3 +++ .../Unit/TransactionRules/Actions/SetSourceAccountTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/AmountLessTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/AmountMoreTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/BudgetIsTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/CategoryIsTest.php | 3 +++ .../TransactionRules/Triggers/DescriptionContainsTest.php | 3 +++ .../Unit/TransactionRules/Triggers/DescriptionEndsTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php | 3 +++ .../TransactionRules/Triggers/DescriptionStartsTest.php | 3 +++ .../TransactionRules/Triggers/FromAccountContainsTest.php | 3 +++ .../Unit/TransactionRules/Triggers/FromAccountEndsTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php | 3 +++ .../TransactionRules/Triggers/FromAccountStartsTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php | 3 +++ .../Unit/TransactionRules/Triggers/HasAnyCategoryTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/HasNoTagTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/NotesAnyTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/NotesAreTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/NotesContainTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/NotesEndTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/NotesStartTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/TagIsTest.php | 3 +++ .../TransactionRules/Triggers/ToAccountContainsTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php | 3 +++ tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php | 3 +++ .../Unit/TransactionRules/Triggers/ToAccountStartsTest.php | 3 +++ .../Unit/TransactionRules/Triggers/TransactionTypeTest.php | 3 +++ tests/Unit/Transformers/AccountTransformerTest.php | 4 ++++ tests/Unit/Transformers/AttachmentTransformerTest.php | 3 +++ tests/Unit/Transformers/AvailableBudgetTransformerTest.php | 3 +++ tests/Unit/Transformers/BillTransformerTest.php | 3 +++ tests/Unit/Transformers/BudgetLimitTransformerTest.php | 3 +++ tests/Unit/Transformers/BudgetTransformerTest.php | 3 +++ tests/Unit/Transformers/CategoryTransformerTest.php | 3 +++ .../Transformers/CurrencyExchangeRateTransformerTest.php | 3 +++ tests/Unit/Transformers/CurrencyTransformerTest.php | 3 +++ tests/Unit/Transformers/ImportJobTransformerTest.php | 3 +++ tests/Unit/Transformers/LinkTypeTransformerTest.php | 3 +++ tests/Unit/Transformers/PiggyBankEventTransformerTest.php | 3 +++ tests/Unit/Transformers/PiggyBankTransformerTest.php | 3 +++ tests/Unit/Transformers/PreferenceTransformerTest.php | 3 +++ tests/Unit/Transformers/RecurrenceTransformerTest.php | 3 +++ tests/Unit/Transformers/RuleGroupTransformerTest.php | 3 +++ tests/Unit/Transformers/RuleTransformerTest.php | 3 +++ tests/Unit/Transformers/TagTransformerTest.php | 3 +++ .../Unit/Transformers/TransactionGroupTransformerTest.php | 3 +++ tests/Unit/Transformers/TransactionLinkTransformerTest.php | 3 +++ tests/Unit/Transformers/UserTransformerTest.php | 3 +++ 272 files changed, 818 insertions(+), 7 deletions(-) diff --git a/tests/Api/V1/Controllers/Chart/AccountControllerTest.php b/tests/Api/V1/Controllers/Chart/AccountControllerTest.php index ab7c178551..6af09b1a1a 100644 --- a/tests/Api/V1/Controllers/Chart/AccountControllerTest.php +++ b/tests/Api/V1/Controllers/Chart/AccountControllerTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class AccountControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AccountControllerTest extends TestCase { diff --git a/tests/Api/V1/Controllers/Chart/AvailableBudgetControllerTest.php b/tests/Api/V1/Controllers/Chart/AvailableBudgetControllerTest.php index 021e61f38a..73128554ed 100644 --- a/tests/Api/V1/Controllers/Chart/AvailableBudgetControllerTest.php +++ b/tests/Api/V1/Controllers/Chart/AvailableBudgetControllerTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class AvailableBudgetControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AvailableBudgetControllerTest extends TestCase { diff --git a/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php b/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php index 8496c1ed31..e1fd5a08ce 100644 --- a/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php +++ b/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class CategoryControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CategoryControllerTest extends TestCase { diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index a463ed26b2..93695f63fb 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -27,6 +27,9 @@ use Illuminate\Contracts\Console\Kernel; /** * Trait CreatesApplication * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ trait CreatesApplication { diff --git a/tests/Feature/Controllers/Account/CreateControllerTest.php b/tests/Feature/Controllers/Account/CreateControllerTest.php index 317227a041..dc1ab0692c 100644 --- a/tests/Feature/Controllers/Account/CreateControllerTest.php +++ b/tests/Feature/Controllers/Account/CreateControllerTest.php @@ -39,8 +39,9 @@ use Tests\TestCase; * * Class CreateControllerTest. * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Account/DeleteControllerTest.php b/tests/Feature/Controllers/Account/DeleteControllerTest.php index d4b5a4c4e4..eb65fd05e6 100644 --- a/tests/Feature/Controllers/Account/DeleteControllerTest.php +++ b/tests/Feature/Controllers/Account/DeleteControllerTest.php @@ -38,8 +38,9 @@ use Tests\TestCase; * * Class DeleteControllerTest * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Account/EditControllerTest.php b/tests/Feature/Controllers/Account/EditControllerTest.php index 1725c4414c..600dfb7277 100644 --- a/tests/Feature/Controllers/Account/EditControllerTest.php +++ b/tests/Feature/Controllers/Account/EditControllerTest.php @@ -38,8 +38,9 @@ use Tests\TestCase; * * Class EditControllerTest * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EditControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Account/IndexControllerTest.php b/tests/Feature/Controllers/Account/IndexControllerTest.php index 6e608e72ae..c3444bd689 100644 --- a/tests/Feature/Controllers/Account/IndexControllerTest.php +++ b/tests/Feature/Controllers/Account/IndexControllerTest.php @@ -38,8 +38,9 @@ use Tests\TestCase; /** * Class IndexControllerTest * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IndexControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Account/ReconcileControllerTest.php b/tests/Feature/Controllers/Account/ReconcileControllerTest.php index 7808bb05d5..9a21c0c2b8 100644 --- a/tests/Feature/Controllers/Account/ReconcileControllerTest.php +++ b/tests/Feature/Controllers/Account/ReconcileControllerTest.php @@ -39,9 +39,10 @@ use Tests\TestCase; /** * Class ConfigurationControllerTest - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ReconcileControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Account/ShowControllerTest.php b/tests/Feature/Controllers/Account/ShowControllerTest.php index b3f1b5dd99..d5c401f1f4 100644 --- a/tests/Feature/Controllers/Account/ShowControllerTest.php +++ b/tests/Feature/Controllers/Account/ShowControllerTest.php @@ -42,8 +42,9 @@ use Tests\TestCase; * * Class ShowControllerTest * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ShowControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Admin/ConfigurationControllerTest.php b/tests/Feature/Controllers/Admin/ConfigurationControllerTest.php index bc863e633a..b8e615d112 100644 --- a/tests/Feature/Controllers/Admin/ConfigurationControllerTest.php +++ b/tests/Feature/Controllers/Admin/ConfigurationControllerTest.php @@ -32,6 +32,10 @@ use Tests\TestCase; /** * Class ConfigurationControllerTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ConfigurationControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Admin/HomeControllerTest.php b/tests/Feature/Controllers/Admin/HomeControllerTest.php index e590841992..976c1d29e9 100644 --- a/tests/Feature/Controllers/Admin/HomeControllerTest.php +++ b/tests/Feature/Controllers/Admin/HomeControllerTest.php @@ -31,6 +31,10 @@ use Tests\TestCase; /** * Class HomeControllerTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HomeControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Admin/UpdateControllerTest.php b/tests/Feature/Controllers/Admin/UpdateControllerTest.php index dbb3df9a8f..659da6c936 100644 --- a/tests/Feature/Controllers/Admin/UpdateControllerTest.php +++ b/tests/Feature/Controllers/Admin/UpdateControllerTest.php @@ -35,6 +35,10 @@ use Tests\TestCase; /** * Class UpdateControllerTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class UpdateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Admin/UserControllerTest.php b/tests/Feature/Controllers/Admin/UserControllerTest.php index abfdd737e1..57eabb51a8 100644 --- a/tests/Feature/Controllers/Admin/UserControllerTest.php +++ b/tests/Feature/Controllers/Admin/UserControllerTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class UserControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class UserControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php b/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php index ac633b01ea..956128ca36 100644 --- a/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php +++ b/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class TwoFactorControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TwoFactorControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Budget/AmountControllerTest.php b/tests/Feature/Controllers/Budget/AmountControllerTest.php index 671b5930f5..649310ddd7 100644 --- a/tests/Feature/Controllers/Budget/AmountControllerTest.php +++ b/tests/Feature/Controllers/Budget/AmountControllerTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * * Class AmountControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Budget/CreateControllerTest.php b/tests/Feature/Controllers/Budget/CreateControllerTest.php index d4753f2b2c..72176fd05b 100644 --- a/tests/Feature/Controllers/Budget/CreateControllerTest.php +++ b/tests/Feature/Controllers/Budget/CreateControllerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * * Class CreateControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Budget/DeleteControllerTest.php b/tests/Feature/Controllers/Budget/DeleteControllerTest.php index 08fa1dd524..6eb6c55b40 100644 --- a/tests/Feature/Controllers/Budget/DeleteControllerTest.php +++ b/tests/Feature/Controllers/Budget/DeleteControllerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class DeleteControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Budget/EditControllerTest.php b/tests/Feature/Controllers/Budget/EditControllerTest.php index 60082c81e5..cc17c668ec 100644 --- a/tests/Feature/Controllers/Budget/EditControllerTest.php +++ b/tests/Feature/Controllers/Budget/EditControllerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class EditControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EditControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Category/CreateControllerTest.php b/tests/Feature/Controllers/Category/CreateControllerTest.php index 5539ccbb9f..7051defe17 100644 --- a/tests/Feature/Controllers/Category/CreateControllerTest.php +++ b/tests/Feature/Controllers/Category/CreateControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class CreateControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Category/DeleteControllerTest.php b/tests/Feature/Controllers/Category/DeleteControllerTest.php index 55ef0ab04f..adc370c5a3 100644 --- a/tests/Feature/Controllers/Category/DeleteControllerTest.php +++ b/tests/Feature/Controllers/Category/DeleteControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class DeleteControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Category/EditControllerTest.php b/tests/Feature/Controllers/Category/EditControllerTest.php index f45c813d18..f012cf925e 100644 --- a/tests/Feature/Controllers/Category/EditControllerTest.php +++ b/tests/Feature/Controllers/Category/EditControllerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class EditControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EditControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Category/IndexControllerTest.php b/tests/Feature/Controllers/Category/IndexControllerTest.php index 9f47e52a24..f6f0f03875 100644 --- a/tests/Feature/Controllers/Category/IndexControllerTest.php +++ b/tests/Feature/Controllers/Category/IndexControllerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class IndexControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IndexControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/BillControllerTest.php b/tests/Feature/Controllers/Chart/BillControllerTest.php index a92373c3cb..5666849571 100644 --- a/tests/Feature/Controllers/Chart/BillControllerTest.php +++ b/tests/Feature/Controllers/Chart/BillControllerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class BillControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BillControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/BudgetControllerTest.php b/tests/Feature/Controllers/Chart/BudgetControllerTest.php index 568def1fcd..3125ba94bc 100644 --- a/tests/Feature/Controllers/Chart/BudgetControllerTest.php +++ b/tests/Feature/Controllers/Chart/BudgetControllerTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * Class BudgetControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/BudgetReportControllerTest.php b/tests/Feature/Controllers/Chart/BudgetReportControllerTest.php index fa375a3001..127c7c4d7f 100644 --- a/tests/Feature/Controllers/Chart/BudgetReportControllerTest.php +++ b/tests/Feature/Controllers/Chart/BudgetReportControllerTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class BudgetReportControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetReportControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/CategoryReportControllerTest.php b/tests/Feature/Controllers/Chart/CategoryReportControllerTest.php index 92cb518b54..328f843a5d 100644 --- a/tests/Feature/Controllers/Chart/CategoryReportControllerTest.php +++ b/tests/Feature/Controllers/Chart/CategoryReportControllerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * Class CategoryReportControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CategoryReportControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.php b/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.php index eb31db4d29..5f0859266b 100644 --- a/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.php +++ b/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class ExpenseReportControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ExpenseReportControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/PiggyBankControllerTest.php b/tests/Feature/Controllers/Chart/PiggyBankControllerTest.php index 4eeb80bf0e..cdeeea4a9e 100644 --- a/tests/Feature/Controllers/Chart/PiggyBankControllerTest.php +++ b/tests/Feature/Controllers/Chart/PiggyBankControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class PiggyBankControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PiggyBankControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/ReportControllerTest.php b/tests/Feature/Controllers/Chart/ReportControllerTest.php index 1b555df8dd..f2c3ebd1a8 100644 --- a/tests/Feature/Controllers/Chart/ReportControllerTest.php +++ b/tests/Feature/Controllers/Chart/ReportControllerTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class ReportControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ReportControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/TagReportControllerTest.php b/tests/Feature/Controllers/Chart/TagReportControllerTest.php index 45cf7fa7bb..dda96f8431 100644 --- a/tests/Feature/Controllers/Chart/TagReportControllerTest.php +++ b/tests/Feature/Controllers/Chart/TagReportControllerTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class TagReportControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagReportControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Import/CallbackControllerTest.php b/tests/Feature/Controllers/Import/CallbackControllerTest.php index dbb09ebdd8..26abf0db4d 100644 --- a/tests/Feature/Controllers/Import/CallbackControllerTest.php +++ b/tests/Feature/Controllers/Import/CallbackControllerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class CallbackControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CallbackControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php b/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php index 5f8f9f6e00..1c88135913 100644 --- a/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php +++ b/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * Class JobConfigurationControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class JobConfigurationControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Json/AutoCompleteControllerTest.php b/tests/Feature/Controllers/Json/AutoCompleteControllerTest.php index 320810a307..376201714a 100644 --- a/tests/Feature/Controllers/Json/AutoCompleteControllerTest.php +++ b/tests/Feature/Controllers/Json/AutoCompleteControllerTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class AutoCompleteControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AutoCompleteControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Json/BoxControllerTest.php b/tests/Feature/Controllers/Json/BoxControllerTest.php index a4b6ba31b9..ccdb01fa0c 100644 --- a/tests/Feature/Controllers/Json/BoxControllerTest.php +++ b/tests/Feature/Controllers/Json/BoxControllerTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * Class BoxControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BoxControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Json/ReconcileControllerTest.php b/tests/Feature/Controllers/Json/ReconcileControllerTest.php index 0f819d808c..9491f23019 100644 --- a/tests/Feature/Controllers/Json/ReconcileControllerTest.php +++ b/tests/Feature/Controllers/Json/ReconcileControllerTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * * Class ReconcileControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ReconcileControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Json/RecurrenceControllerTest.php b/tests/Feature/Controllers/Json/RecurrenceControllerTest.php index f20f7976ae..dd634c2864 100644 --- a/tests/Feature/Controllers/Json/RecurrenceControllerTest.php +++ b/tests/Feature/Controllers/Json/RecurrenceControllerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class RecurrenceControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RecurrenceControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Recurring/CreateControllerTest.php b/tests/Feature/Controllers/Recurring/CreateControllerTest.php index 34f5f0b1f7..c18f31eb82 100644 --- a/tests/Feature/Controllers/Recurring/CreateControllerTest.php +++ b/tests/Feature/Controllers/Recurring/CreateControllerTest.php @@ -44,7 +44,9 @@ use Tests\TestCase; /** * * Class CreateControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Recurring/DeleteControllerTest.php b/tests/Feature/Controllers/Recurring/DeleteControllerTest.php index 8391ed0dbd..265ebf338c 100644 --- a/tests/Feature/Controllers/Recurring/DeleteControllerTest.php +++ b/tests/Feature/Controllers/Recurring/DeleteControllerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * * Class DeleteControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Recurring/EditControllerTest.php b/tests/Feature/Controllers/Recurring/EditControllerTest.php index 1a145570aa..c735cc82cc 100644 --- a/tests/Feature/Controllers/Recurring/EditControllerTest.php +++ b/tests/Feature/Controllers/Recurring/EditControllerTest.php @@ -43,6 +43,9 @@ use Tests\TestCase; /** * * Class EditControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EditControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Recurring/IndexControllerTest.php b/tests/Feature/Controllers/Recurring/IndexControllerTest.php index 216a0c762a..d09f3fe23e 100644 --- a/tests/Feature/Controllers/Recurring/IndexControllerTest.php +++ b/tests/Feature/Controllers/Recurring/IndexControllerTest.php @@ -40,6 +40,9 @@ use Tests\TestCase; /** * * Class IndexControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IndexControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Rule/CreateControllerTest.php b/tests/Feature/Controllers/Rule/CreateControllerTest.php index 27ef55128a..f84aaee53e 100644 --- a/tests/Feature/Controllers/Rule/CreateControllerTest.php +++ b/tests/Feature/Controllers/Rule/CreateControllerTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class CreateControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Rule/DeleteControllerTest.php b/tests/Feature/Controllers/Rule/DeleteControllerTest.php index 6abeb626dd..70fb2edcaa 100644 --- a/tests/Feature/Controllers/Rule/DeleteControllerTest.php +++ b/tests/Feature/Controllers/Rule/DeleteControllerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * * Class DeleteControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Rule/EditControllerTest.php b/tests/Feature/Controllers/Rule/EditControllerTest.php index 35d67bb4a6..95e5bc2992 100644 --- a/tests/Feature/Controllers/Rule/EditControllerTest.php +++ b/tests/Feature/Controllers/Rule/EditControllerTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class EditControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EditControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Rule/SelectControllerTest.php b/tests/Feature/Controllers/Rule/SelectControllerTest.php index a6a71f3fd6..88c84b1066 100644 --- a/tests/Feature/Controllers/Rule/SelectControllerTest.php +++ b/tests/Feature/Controllers/Rule/SelectControllerTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * Class SelectControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SelectControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/RuleGroup/CreateControllerTest.php b/tests/Feature/Controllers/RuleGroup/CreateControllerTest.php index fa19bce040..d2ce60ca7e 100644 --- a/tests/Feature/Controllers/RuleGroup/CreateControllerTest.php +++ b/tests/Feature/Controllers/RuleGroup/CreateControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class CreateControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/RuleGroup/DeleteControllerTest.php b/tests/Feature/Controllers/RuleGroup/DeleteControllerTest.php index 9f6a37bed6..b1f134f04f 100644 --- a/tests/Feature/Controllers/RuleGroup/DeleteControllerTest.php +++ b/tests/Feature/Controllers/RuleGroup/DeleteControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class DeleteControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/RuleGroup/EditControllerTest.php b/tests/Feature/Controllers/RuleGroup/EditControllerTest.php index 927657d640..376845be23 100644 --- a/tests/Feature/Controllers/RuleGroup/EditControllerTest.php +++ b/tests/Feature/Controllers/RuleGroup/EditControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class EditControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EditControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/RuleGroup/ExecutionControllerTest.php b/tests/Feature/Controllers/RuleGroup/ExecutionControllerTest.php index 6bcb9a0223..b8991402a8 100644 --- a/tests/Feature/Controllers/RuleGroup/ExecutionControllerTest.php +++ b/tests/Feature/Controllers/RuleGroup/ExecutionControllerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * Class ExecutionControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ExecutionControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/System/CronControllerTest.php b/tests/Feature/Controllers/System/CronControllerTest.php index 4b4c106b55..1b3a804aab 100644 --- a/tests/Feature/Controllers/System/CronControllerTest.php +++ b/tests/Feature/Controllers/System/CronControllerTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * * Class CronControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CronControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Transaction/CreateControllerTest.php b/tests/Feature/Controllers/Transaction/CreateControllerTest.php index b785b7b77e..279ec37def 100644 --- a/tests/Feature/Controllers/Transaction/CreateControllerTest.php +++ b/tests/Feature/Controllers/Transaction/CreateControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class CreateControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Transaction/EditControllerTest.php b/tests/Feature/Controllers/Transaction/EditControllerTest.php index 46460247e7..214c83fd73 100644 --- a/tests/Feature/Controllers/Transaction/EditControllerTest.php +++ b/tests/Feature/Controllers/Transaction/EditControllerTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class EditControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EditControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Transaction/IndexControllerTest.php b/tests/Feature/Controllers/Transaction/IndexControllerTest.php index 4ecbe745a2..e071ff2ae9 100644 --- a/tests/Feature/Controllers/Transaction/IndexControllerTest.php +++ b/tests/Feature/Controllers/Transaction/IndexControllerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class IndexControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IndexControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Transaction/LinkControllerTest.php b/tests/Feature/Controllers/Transaction/LinkControllerTest.php index e6d37a859d..0e52b12157 100644 --- a/tests/Feature/Controllers/Transaction/LinkControllerTest.php +++ b/tests/Feature/Controllers/Transaction/LinkControllerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * Class LinkControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class LinkControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Transaction/ShowControllerTest.php b/tests/Feature/Controllers/Transaction/ShowControllerTest.php index 00d6a28c25..bfb50304e0 100644 --- a/tests/Feature/Controllers/Transaction/ShowControllerTest.php +++ b/tests/Feature/Controllers/Transaction/ShowControllerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class ShowControllerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ShowControllerTest extends TestCase { diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 0088f7e6f4..2e48da3817 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -26,6 +26,9 @@ use Tests\TestCase; /** * Class ExampleTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ExampleTest extends TestCase { diff --git a/tests/Object/FakeApiContext.php b/tests/Object/FakeApiContext.php index a929bbac42..d93cc522f9 100644 --- a/tests/Object/FakeApiContext.php +++ b/tests/Object/FakeApiContext.php @@ -25,6 +25,9 @@ namespace Tests\Object; /** * Class FakeApiContext + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FakeApiContext { diff --git a/tests/TestCase.php b/tests/TestCase.php index 821928f173..416ba86f1a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -64,6 +64,9 @@ use RuntimeException; * Class TestCase * * @SuppressWarnings(PHPMD.NumberOfChildren) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ abstract class TestCase extends BaseTestCase { diff --git a/tests/Unit/Console/Commands/Correction/CreateAccessTokensTest.php b/tests/Unit/Console/Commands/Correction/CreateAccessTokensTest.php index 384b22c175..a078c5dc9b 100644 --- a/tests/Unit/Console/Commands/Correction/CreateAccessTokensTest.php +++ b/tests/Unit/Console/Commands/Correction/CreateAccessTokensTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class CreateAccessTokensTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateAccessTokensTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/CreateLinkTypesTest.php b/tests/Unit/Console/Commands/Correction/CreateLinkTypesTest.php index db04b21796..b69ab1c3d5 100644 --- a/tests/Unit/Console/Commands/Correction/CreateLinkTypesTest.php +++ b/tests/Unit/Console/Commands/Correction/CreateLinkTypesTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class CreateLinkTypesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateLinkTypesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/DeleteEmptyGroupsTest.php b/tests/Unit/Console/Commands/Correction/DeleteEmptyGroupsTest.php index 4d07dc7078..ae0503a32e 100644 --- a/tests/Unit/Console/Commands/Correction/DeleteEmptyGroupsTest.php +++ b/tests/Unit/Console/Commands/Correction/DeleteEmptyGroupsTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class DeleteEmptyGroupsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteEmptyGroupsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/DeleteEmptyJournalsTest.php b/tests/Unit/Console/Commands/Correction/DeleteEmptyJournalsTest.php index 47bad505d8..ae49907090 100644 --- a/tests/Unit/Console/Commands/Correction/DeleteEmptyJournalsTest.php +++ b/tests/Unit/Console/Commands/Correction/DeleteEmptyJournalsTest.php @@ -27,6 +27,13 @@ use FireflyIII\Models\TransactionJournal; use Log; use Tests\TestCase; +/** + * Class DeleteEmptyJournalsTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) + */ class DeleteEmptyJournalsTest extends TestCase { /** diff --git a/tests/Unit/Console/Commands/Correction/DeleteOrphanedTransactionsTest.php b/tests/Unit/Console/Commands/Correction/DeleteOrphanedTransactionsTest.php index d9ce06b711..b65a790d38 100644 --- a/tests/Unit/Console/Commands/Correction/DeleteOrphanedTransactionsTest.php +++ b/tests/Unit/Console/Commands/Correction/DeleteOrphanedTransactionsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class DeleteOrphanedTransactionsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteOrphanedTransactionsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/DeleteZeroAmountTest.php b/tests/Unit/Console/Commands/Correction/DeleteZeroAmountTest.php index 946a03672e..9579862277 100644 --- a/tests/Unit/Console/Commands/Correction/DeleteZeroAmountTest.php +++ b/tests/Unit/Console/Commands/Correction/DeleteZeroAmountTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class DeleteZeroAmountTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DeleteZeroAmountTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/EnableCurrenciesTest.php b/tests/Unit/Console/Commands/Correction/EnableCurrenciesTest.php index 40163938c8..ae7cc6b4d7 100644 --- a/tests/Unit/Console/Commands/Correction/EnableCurrenciesTest.php +++ b/tests/Unit/Console/Commands/Correction/EnableCurrenciesTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class EnableCurrenciesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class EnableCurrenciesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/FixAccountTypesTest.php b/tests/Unit/Console/Commands/Correction/FixAccountTypesTest.php index 7d6b9d0cea..79ed0a307e 100644 --- a/tests/Unit/Console/Commands/Correction/FixAccountTypesTest.php +++ b/tests/Unit/Console/Commands/Correction/FixAccountTypesTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class FixAccountTypesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FixAccountTypesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/FixPiggiesTest.php b/tests/Unit/Console/Commands/Correction/FixPiggiesTest.php index 6f71a03ab6..8ed2d97157 100644 --- a/tests/Unit/Console/Commands/Correction/FixPiggiesTest.php +++ b/tests/Unit/Console/Commands/Correction/FixPiggiesTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class FixPiggiesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FixPiggiesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/FixUnevenAmountTest.php b/tests/Unit/Console/Commands/Correction/FixUnevenAmountTest.php index d5aa891a7a..553e5bd3b6 100644 --- a/tests/Unit/Console/Commands/Correction/FixUnevenAmountTest.php +++ b/tests/Unit/Console/Commands/Correction/FixUnevenAmountTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class FixUnevenAmountTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FixUnevenAmountTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/RemoveBillsTest.php b/tests/Unit/Console/Commands/Correction/RemoveBillsTest.php index ef2b5b35ac..d7b260de29 100644 --- a/tests/Unit/Console/Commands/Correction/RemoveBillsTest.php +++ b/tests/Unit/Console/Commands/Correction/RemoveBillsTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class RemoveBillsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RemoveBillsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/RenameMetaFieldsTest.php b/tests/Unit/Console/Commands/Correction/RenameMetaFieldsTest.php index 34e8d6a1bf..1d180e196a 100644 --- a/tests/Unit/Console/Commands/Correction/RenameMetaFieldsTest.php +++ b/tests/Unit/Console/Commands/Correction/RenameMetaFieldsTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class RenameMetaFieldsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RenameMetaFieldsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Correction/TransferBudgetsTest.php b/tests/Unit/Console/Commands/Correction/TransferBudgetsTest.php index 5512b2a86e..af287310a3 100644 --- a/tests/Unit/Console/Commands/Correction/TransferBudgetsTest.php +++ b/tests/Unit/Console/Commands/Correction/TransferBudgetsTest.php @@ -27,6 +27,9 @@ use Tests\TestCase; /** * Class TransferBudgetsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransferBudgetsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/DecryptDatabaseTest.php b/tests/Unit/Console/Commands/DecryptDatabaseTest.php index dde70b3b15..9264a3eba9 100644 --- a/tests/Unit/Console/Commands/DecryptDatabaseTest.php +++ b/tests/Unit/Console/Commands/DecryptDatabaseTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class DecryptDatabaseTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DecryptDatabaseTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Import/CreateCSVImportTest.php b/tests/Unit/Console/Commands/Import/CreateCSVImportTest.php index 5069ae66d0..3570525eea 100644 --- a/tests/Unit/Console/Commands/Import/CreateCSVImportTest.php +++ b/tests/Unit/Console/Commands/Import/CreateCSVImportTest.php @@ -37,6 +37,9 @@ use Tests\TestCase; /** * Class CreateCSVImportTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateCSVImportTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Integrity/ReportEmptyObjectsTest.php b/tests/Unit/Console/Commands/Integrity/ReportEmptyObjectsTest.php index 48f6a8f9ba..e92ce512b9 100644 --- a/tests/Unit/Console/Commands/Integrity/ReportEmptyObjectsTest.php +++ b/tests/Unit/Console/Commands/Integrity/ReportEmptyObjectsTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class ReportEmptyObjectsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ReportEmptyObjectsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Integrity/ReportSumTest.php b/tests/Unit/Console/Commands/Integrity/ReportSumTest.php index 1377a83231..84803c599b 100644 --- a/tests/Unit/Console/Commands/Integrity/ReportSumTest.php +++ b/tests/Unit/Console/Commands/Integrity/ReportSumTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class ReportSumTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ReportSumTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Tools/ApplyRulesTest.php b/tests/Unit/Console/Commands/Tools/ApplyRulesTest.php index 1f12494957..6f37a3052c 100644 --- a/tests/Unit/Console/Commands/Tools/ApplyRulesTest.php +++ b/tests/Unit/Console/Commands/Tools/ApplyRulesTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class ApplyRulesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ApplyRulesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/AccountCurrenciesTest.php b/tests/Unit/Console/Commands/Upgrade/AccountCurrenciesTest.php index 87642d6f2e..18d79848fc 100644 --- a/tests/Unit/Console/Commands/Upgrade/AccountCurrenciesTest.php +++ b/tests/Unit/Console/Commands/Upgrade/AccountCurrenciesTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class AccountCurrenciesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AccountCurrenciesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/BackToJournalsTest.php b/tests/Unit/Console/Commands/Upgrade/BackToJournalsTest.php index 203471e974..ab0fbcafe8 100644 --- a/tests/Unit/Console/Commands/Upgrade/BackToJournalsTest.php +++ b/tests/Unit/Console/Commands/Upgrade/BackToJournalsTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class BackToJournalsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BackToJournalsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php b/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php index bd10d590db..0eb3e613c5 100644 --- a/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php +++ b/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class BudgetLimitCurrencyTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetLimitCurrencyTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/CCLiabilitiesTest.php b/tests/Unit/Console/Commands/Upgrade/CCLiabilitiesTest.php index ef093beb38..6d91da0513 100644 --- a/tests/Unit/Console/Commands/Upgrade/CCLiabilitiesTest.php +++ b/tests/Unit/Console/Commands/Upgrade/CCLiabilitiesTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class CCLiabilitiesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CCLiabilitiesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/MigrateAttachmentsTest.php b/tests/Unit/Console/Commands/Upgrade/MigrateAttachmentsTest.php index 812d6ad041..c50bdaea37 100644 --- a/tests/Unit/Console/Commands/Upgrade/MigrateAttachmentsTest.php +++ b/tests/Unit/Console/Commands/Upgrade/MigrateAttachmentsTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class MigrateAttachmentsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MigrateAttachmentsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/MigrateJournalNotesTest.php b/tests/Unit/Console/Commands/Upgrade/MigrateJournalNotesTest.php index 07048bcc47..4da35a5a62 100644 --- a/tests/Unit/Console/Commands/Upgrade/MigrateJournalNotesTest.php +++ b/tests/Unit/Console/Commands/Upgrade/MigrateJournalNotesTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class MigrateJournalNotesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MigrateJournalNotesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/MigrateToGroupsTest.php b/tests/Unit/Console/Commands/Upgrade/MigrateToGroupsTest.php index 8c4d12ff17..4fb216a5e6 100644 --- a/tests/Unit/Console/Commands/Upgrade/MigrateToGroupsTest.php +++ b/tests/Unit/Console/Commands/Upgrade/MigrateToGroupsTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class MigrateToGroupsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MigrateToGroupsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/MigrateToRulesTest.php b/tests/Unit/Console/Commands/Upgrade/MigrateToRulesTest.php index 8d98ac5827..3d6a46da0d 100644 --- a/tests/Unit/Console/Commands/Upgrade/MigrateToRulesTest.php +++ b/tests/Unit/Console/Commands/Upgrade/MigrateToRulesTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class MigrateToRulesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MigrateToRulesTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.php b/tests/Unit/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.php index 9126cf9704..0b70bb94d5 100644 --- a/tests/Unit/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.php +++ b/tests/Unit/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class OtherCurrenciesCorrectionsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class OtherCurrenciesCorrectionsTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/RenameAccountMetaTest.php b/tests/Unit/Console/Commands/Upgrade/RenameAccountMetaTest.php index a534da8d53..d22a22f9a0 100644 --- a/tests/Unit/Console/Commands/Upgrade/RenameAccountMetaTest.php +++ b/tests/Unit/Console/Commands/Upgrade/RenameAccountMetaTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class RenameAccountMetaTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RenameAccountMetaTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/TransactionIdentifierTest.php b/tests/Unit/Console/Commands/Upgrade/TransactionIdentifierTest.php index 1e305a3006..467297debf 100644 --- a/tests/Unit/Console/Commands/Upgrade/TransactionIdentifierTest.php +++ b/tests/Unit/Console/Commands/Upgrade/TransactionIdentifierTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class TransactionIdentifierTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionIdentifierTest extends TestCase { diff --git a/tests/Unit/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.php b/tests/Unit/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.php index 8dbab7edfc..500a10109b 100644 --- a/tests/Unit/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.php +++ b/tests/Unit/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class TransferCurrenciesCorrectionsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransferCurrenciesCorrectionsTest extends TestCase { diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 885cf132c4..c6eb4b093c 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -26,6 +26,9 @@ use Tests\TestCase; /** * Class ExampleTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ExampleTest extends TestCase { diff --git a/tests/Unit/Factory/AccountFactoryTest.php b/tests/Unit/Factory/AccountFactoryTest.php index 1cc9045205..8f7bdd8069 100644 --- a/tests/Unit/Factory/AccountFactoryTest.php +++ b/tests/Unit/Factory/AccountFactoryTest.php @@ -41,7 +41,9 @@ use Tests\TestCase; /** * Class AccountFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AccountFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/AccountMetaFactoryTest.php b/tests/Unit/Factory/AccountMetaFactoryTest.php index 618597d929..18b8430932 100644 --- a/tests/Unit/Factory/AccountMetaFactoryTest.php +++ b/tests/Unit/Factory/AccountMetaFactoryTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * * Class AccountMetaFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AccountMetaFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/AttachmentFactoryTest.php b/tests/Unit/Factory/AttachmentFactoryTest.php index 548019536d..88f86a79c4 100644 --- a/tests/Unit/Factory/AttachmentFactoryTest.php +++ b/tests/Unit/Factory/AttachmentFactoryTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * * Class AttachmentFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AttachmentFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/BillFactoryTest.php b/tests/Unit/Factory/BillFactoryTest.php index 41a9e66678..9485722b02 100644 --- a/tests/Unit/Factory/BillFactoryTest.php +++ b/tests/Unit/Factory/BillFactoryTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class BillFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BillFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/BudgetFactoryTest.php b/tests/Unit/Factory/BudgetFactoryTest.php index ccbac463e2..f8c6c755c6 100644 --- a/tests/Unit/Factory/BudgetFactoryTest.php +++ b/tests/Unit/Factory/BudgetFactoryTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class BudgetFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/CategoryFactoryTest.php b/tests/Unit/Factory/CategoryFactoryTest.php index 565b46cf6e..768ece5fe9 100644 --- a/tests/Unit/Factory/CategoryFactoryTest.php +++ b/tests/Unit/Factory/CategoryFactoryTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class CategoryFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CategoryFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/PiggyBankEventFactoryTest.php b/tests/Unit/Factory/PiggyBankEventFactoryTest.php index a0645e38ee..c4dace7159 100644 --- a/tests/Unit/Factory/PiggyBankEventFactoryTest.php +++ b/tests/Unit/Factory/PiggyBankEventFactoryTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class PiggyBankEventFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PiggyBankEventFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/PiggyBankFactoryTest.php b/tests/Unit/Factory/PiggyBankFactoryTest.php index d207f1fd10..eb554fe566 100644 --- a/tests/Unit/Factory/PiggyBankFactoryTest.php +++ b/tests/Unit/Factory/PiggyBankFactoryTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class PiggyBankFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PiggyBankFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/RecurrenceFactoryTest.php b/tests/Unit/Factory/RecurrenceFactoryTest.php index 3998a655f2..9899caa197 100644 --- a/tests/Unit/Factory/RecurrenceFactoryTest.php +++ b/tests/Unit/Factory/RecurrenceFactoryTest.php @@ -52,7 +52,9 @@ use Tests\TestCase; * With the correct types. * * Class RecurrenceFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RecurrenceFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/TagFactoryTest.php b/tests/Unit/Factory/TagFactoryTest.php index 3acc979749..251777eb71 100644 --- a/tests/Unit/Factory/TagFactoryTest.php +++ b/tests/Unit/Factory/TagFactoryTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class TagFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/TransactionCurrencyFactoryTest.php b/tests/Unit/Factory/TransactionCurrencyFactoryTest.php index db49f10e3f..ce9fb583b3 100644 --- a/tests/Unit/Factory/TransactionCurrencyFactoryTest.php +++ b/tests/Unit/Factory/TransactionCurrencyFactoryTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class TransactionCurrencyFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionCurrencyFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/TransactionFactoryTest.php b/tests/Unit/Factory/TransactionFactoryTest.php index 2bd9947045..bb03800d75 100644 --- a/tests/Unit/Factory/TransactionFactoryTest.php +++ b/tests/Unit/Factory/TransactionFactoryTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class TransactionFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/TransactionJournalFactoryTest.php b/tests/Unit/Factory/TransactionJournalFactoryTest.php index 8601b69552..60ccb47a0a 100644 --- a/tests/Unit/Factory/TransactionJournalFactoryTest.php +++ b/tests/Unit/Factory/TransactionJournalFactoryTest.php @@ -50,6 +50,9 @@ use Tests\TestCase; /** * Class TransactionJournalFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionJournalFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/TransactionJournalMetaFactoryTest.php b/tests/Unit/Factory/TransactionJournalMetaFactoryTest.php index 025adb868e..41272fbea4 100644 --- a/tests/Unit/Factory/TransactionJournalMetaFactoryTest.php +++ b/tests/Unit/Factory/TransactionJournalMetaFactoryTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class TransactionJournalMetaFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionJournalMetaFactoryTest extends TestCase { diff --git a/tests/Unit/Factory/TransactionTypeFactoryTest.php b/tests/Unit/Factory/TransactionTypeFactoryTest.php index 25ba1c9e01..d336774b4d 100644 --- a/tests/Unit/Factory/TransactionTypeFactoryTest.php +++ b/tests/Unit/Factory/TransactionTypeFactoryTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * * Class TransactionTypeFactoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionTypeFactoryTest extends TestCase { diff --git a/tests/Unit/Generator/Chart/Basic/ChartJsGeneratorTest.php b/tests/Unit/Generator/Chart/Basic/ChartJsGeneratorTest.php index e660375e04..6bc48fd5e4 100644 --- a/tests/Unit/Generator/Chart/Basic/ChartJsGeneratorTest.php +++ b/tests/Unit/Generator/Chart/Basic/ChartJsGeneratorTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * * Class ChartJsGeneratorTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ChartJsGeneratorTest extends TestCase { diff --git a/tests/Unit/Generator/Report/Audit/MonthReportGeneratorTest.php b/tests/Unit/Generator/Report/Audit/MonthReportGeneratorTest.php index e01688a6f5..6be88ba75f 100644 --- a/tests/Unit/Generator/Report/Audit/MonthReportGeneratorTest.php +++ b/tests/Unit/Generator/Report/Audit/MonthReportGeneratorTest.php @@ -39,6 +39,10 @@ use Tests\TestCase; /** * * Class MonthReportGeneratorTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MonthReportGeneratorTest extends TestCase { diff --git a/tests/Unit/Handlers/Events/APIEventHandlerTest.php b/tests/Unit/Handlers/Events/APIEventHandlerTest.php index 8a382b117d..93efcde1ee 100644 --- a/tests/Unit/Handlers/Events/APIEventHandlerTest.php +++ b/tests/Unit/Handlers/Events/APIEventHandlerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * * Class APIEventHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class APIEventHandlerTest extends TestCase { diff --git a/tests/Unit/Handlers/Events/AdminEventHandlerTest.php b/tests/Unit/Handlers/Events/AdminEventHandlerTest.php index f0a990a64a..8a99dfc934 100644 --- a/tests/Unit/Handlers/Events/AdminEventHandlerTest.php +++ b/tests/Unit/Handlers/Events/AdminEventHandlerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * Class AdminEventHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AdminEventHandlerTest extends TestCase { diff --git a/tests/Unit/Handlers/Events/AutomationHandlerTest.php b/tests/Unit/Handlers/Events/AutomationHandlerTest.php index a5b2cff17f..69ff31e388 100644 --- a/tests/Unit/Handlers/Events/AutomationHandlerTest.php +++ b/tests/Unit/Handlers/Events/AutomationHandlerTest.php @@ -37,6 +37,9 @@ use Tests\TestCase; /** * * Class AutomationHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AutomationHandlerTest extends TestCase { diff --git a/tests/Unit/Handlers/Events/StoredGroupEventHandlerTest.php b/tests/Unit/Handlers/Events/StoredGroupEventHandlerTest.php index 5d74498954..05a86d97c3 100644 --- a/tests/Unit/Handlers/Events/StoredGroupEventHandlerTest.php +++ b/tests/Unit/Handlers/Events/StoredGroupEventHandlerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class StoredGroupEventHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class StoredGroupEventHandlerTest extends TestCase { diff --git a/tests/Unit/Handlers/Events/UpdatedGroupEventHandlerTest.php b/tests/Unit/Handlers/Events/UpdatedGroupEventHandlerTest.php index 13bafdaf53..02ee50be7c 100644 --- a/tests/Unit/Handlers/Events/UpdatedGroupEventHandlerTest.php +++ b/tests/Unit/Handlers/Events/UpdatedGroupEventHandlerTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class UpdatedJournalEventHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class UpdatedGroupEventHandlerTest extends TestCase { diff --git a/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.php b/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.php index 481c8eb539..bd18404c4f 100644 --- a/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.php +++ b/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class VersionCheckEventHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class VersionCheckEventHandlerTest extends TestCase { diff --git a/tests/Unit/Helpers/Fiscal/FiscalHelperTest.php b/tests/Unit/Helpers/Fiscal/FiscalHelperTest.php index 7935e1c1d2..b1e3563901 100644 --- a/tests/Unit/Helpers/Fiscal/FiscalHelperTest.php +++ b/tests/Unit/Helpers/Fiscal/FiscalHelperTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * * Class FiscalHelperTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FiscalHelperTest extends TestCase { diff --git a/tests/Unit/Helpers/Help/HelpTest.php b/tests/Unit/Helpers/Help/HelpTest.php index fdcd17472f..ed6a4278fb 100644 --- a/tests/Unit/Helpers/Help/HelpTest.php +++ b/tests/Unit/Helpers/Help/HelpTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * * Class HelpTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HelpTest extends TestCase { diff --git a/tests/Unit/Helpers/Report/NetWorthTest.php b/tests/Unit/Helpers/Report/NetWorthTest.php index 38a8b70165..e86c147ffd 100644 --- a/tests/Unit/Helpers/Report/NetWorthTest.php +++ b/tests/Unit/Helpers/Report/NetWorthTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * * Class NetWorthTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NetWorthTest extends TestCase { diff --git a/tests/Unit/Import/Converter/AmountCreditTest.php b/tests/Unit/Import/Converter/AmountCreditTest.php index fa4a4f7eb1..57ff0877f2 100644 --- a/tests/Unit/Import/Converter/AmountCreditTest.php +++ b/tests/Unit/Import/Converter/AmountCreditTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class AmountCreditTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountCreditTest extends TestCase { diff --git a/tests/Unit/Import/Converter/AmountDebitTest.php b/tests/Unit/Import/Converter/AmountDebitTest.php index 79656afd6d..cc62382a3e 100644 --- a/tests/Unit/Import/Converter/AmountDebitTest.php +++ b/tests/Unit/Import/Converter/AmountDebitTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class AmountDebitTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountDebitTest extends TestCase { diff --git a/tests/Unit/Import/Converter/AmountNegatedTest.php b/tests/Unit/Import/Converter/AmountNegatedTest.php index bdf8c98fce..3da2874260 100644 --- a/tests/Unit/Import/Converter/AmountNegatedTest.php +++ b/tests/Unit/Import/Converter/AmountNegatedTest.php @@ -27,6 +27,9 @@ use Tests\TestCase; /** * Class AmountNegatedTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountNegatedTest extends TestCase { diff --git a/tests/Unit/Import/Converter/AmountTest.php b/tests/Unit/Import/Converter/AmountTest.php index 4f2533025c..ccf97990e2 100644 --- a/tests/Unit/Import/Converter/AmountTest.php +++ b/tests/Unit/Import/Converter/AmountTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class AmountTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountTest extends TestCase { diff --git a/tests/Unit/Import/Converter/BankDebitCreditTest.php b/tests/Unit/Import/Converter/BankDebitCreditTest.php index 78b314a530..3fa2a6c314 100644 --- a/tests/Unit/Import/Converter/BankDebitCreditTest.php +++ b/tests/Unit/Import/Converter/BankDebitCreditTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * * Class BankDebitCreditTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BankDebitCreditTest extends TestCase { diff --git a/tests/Unit/Import/JobConfiguration/BunqJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/BunqJobConfigurationTest.php index 842d8021ae..7b206eea0b 100644 --- a/tests/Unit/Import/JobConfiguration/BunqJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/BunqJobConfigurationTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * Class BunqJobConfigurationTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BunqJobConfigurationTest extends TestCase { diff --git a/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php index 01e6a991d2..d3950230cc 100644 --- a/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class FakeJobConfigurationTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FakeJobConfigurationTest extends TestCase { diff --git a/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php index 433032a174..de8faf3b61 100644 --- a/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * Class FileJobConfigurationTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FileJobConfigurationTest extends TestCase { diff --git a/tests/Unit/Import/JobConfiguration/FinTSJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/FinTSJobConfigurationTest.php index 0190e65d5b..fd7ef5cf99 100644 --- a/tests/Unit/Import/JobConfiguration/FinTSJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/FinTSJobConfigurationTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class FinTSJobConfigurationTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FinTSJobConfigurationTest extends TestCase { diff --git a/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php index 5184fdadb2..7639f66edd 100644 --- a/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class SpectreJobConfigurationTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SpectreJobConfigurationTest extends TestCase { diff --git a/tests/Unit/Import/JobConfiguration/YnabJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/YnabJobConfigurationTest.php index 291ad992af..ecf6168202 100644 --- a/tests/Unit/Import/JobConfiguration/YnabJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/YnabJobConfigurationTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class YnabJobConfigurationTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class YnabJobConfigurationTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/AssetAccountIbansTest.php b/tests/Unit/Import/Mapper/AssetAccountIbansTest.php index 27c4fe2477..47c99de10d 100644 --- a/tests/Unit/Import/Mapper/AssetAccountIbansTest.php +++ b/tests/Unit/Import/Mapper/AssetAccountIbansTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class AssetAccountIbansTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AssetAccountIbansTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/AssetAccountsTest.php b/tests/Unit/Import/Mapper/AssetAccountsTest.php index 024edf41cf..cb1d6c7d7d 100644 --- a/tests/Unit/Import/Mapper/AssetAccountsTest.php +++ b/tests/Unit/Import/Mapper/AssetAccountsTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class AssetAccountsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AssetAccountsTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/BillsTest.php b/tests/Unit/Import/Mapper/BillsTest.php index 460b155234..808ed69cf8 100644 --- a/tests/Unit/Import/Mapper/BillsTest.php +++ b/tests/Unit/Import/Mapper/BillsTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class BillsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BillsTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/BudgetsTest.php b/tests/Unit/Import/Mapper/BudgetsTest.php index 8b440f8f7f..3b0924bd46 100644 --- a/tests/Unit/Import/Mapper/BudgetsTest.php +++ b/tests/Unit/Import/Mapper/BudgetsTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class BudgetsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetsTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/CategoriesTest.php b/tests/Unit/Import/Mapper/CategoriesTest.php index 14f5ff46ff..5d8bf9d35a 100644 --- a/tests/Unit/Import/Mapper/CategoriesTest.php +++ b/tests/Unit/Import/Mapper/CategoriesTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class CategoriesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CategoriesTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/OpposingAccountIbansTest.php b/tests/Unit/Import/Mapper/OpposingAccountIbansTest.php index 494bb6376f..9b40d68d46 100644 --- a/tests/Unit/Import/Mapper/OpposingAccountIbansTest.php +++ b/tests/Unit/Import/Mapper/OpposingAccountIbansTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class OpposingAccountIbansTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class OpposingAccountIbansTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/OpposingAccountsTest.php b/tests/Unit/Import/Mapper/OpposingAccountsTest.php index 8687dcdc6d..b0d1a5cb18 100644 --- a/tests/Unit/Import/Mapper/OpposingAccountsTest.php +++ b/tests/Unit/Import/Mapper/OpposingAccountsTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class OpposingAccountsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class OpposingAccountsTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/TagsTest.php b/tests/Unit/Import/Mapper/TagsTest.php index b902968092..9092b26600 100644 --- a/tests/Unit/Import/Mapper/TagsTest.php +++ b/tests/Unit/Import/Mapper/TagsTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class TagsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagsTest extends TestCase { diff --git a/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php b/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php index 170e616f09..c674acee64 100644 --- a/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php +++ b/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class TransactionCurrenciesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionCurrenciesTest extends TestCase { diff --git a/tests/Unit/Import/MapperPreProcess/TagsCommaTest.php b/tests/Unit/Import/MapperPreProcess/TagsCommaTest.php index 09d152b017..97ad59da06 100644 --- a/tests/Unit/Import/MapperPreProcess/TagsCommaTest.php +++ b/tests/Unit/Import/MapperPreProcess/TagsCommaTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class TagsCommaTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagsCommaTest extends TestCase { diff --git a/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php b/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php index feb5ce53e7..1c3eda3c5e 100644 --- a/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php +++ b/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class TagsSpaceTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagsSpaceTest extends TestCase { diff --git a/tests/Unit/Import/Prerequisites/BunqPrerequisitesTest.php b/tests/Unit/Import/Prerequisites/BunqPrerequisitesTest.php index c23631d2e9..86b04d466f 100644 --- a/tests/Unit/Import/Prerequisites/BunqPrerequisitesTest.php +++ b/tests/Unit/Import/Prerequisites/BunqPrerequisitesTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class BunqPrerequisitesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BunqPrerequisitesTest extends TestCase { diff --git a/tests/Unit/Import/Prerequisites/FakePrerequisitesTest.php b/tests/Unit/Import/Prerequisites/FakePrerequisitesTest.php index 2718d2af61..f1fdace905 100644 --- a/tests/Unit/Import/Prerequisites/FakePrerequisitesTest.php +++ b/tests/Unit/Import/Prerequisites/FakePrerequisitesTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class FakePrerequisitesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FakePrerequisitesTest extends TestCase { diff --git a/tests/Unit/Import/Prerequisites/SpectrePrerequisitesTest.php b/tests/Unit/Import/Prerequisites/SpectrePrerequisitesTest.php index 957967b203..40902f6387 100644 --- a/tests/Unit/Import/Prerequisites/SpectrePrerequisitesTest.php +++ b/tests/Unit/Import/Prerequisites/SpectrePrerequisitesTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class SpectrePrerequisitesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SpectrePrerequisitesTest extends TestCase { diff --git a/tests/Unit/Import/Prerequisites/YnabPrerequisitesTest.php b/tests/Unit/Import/Prerequisites/YnabPrerequisitesTest.php index a7cd1d970a..d9fb974827 100644 --- a/tests/Unit/Import/Prerequisites/YnabPrerequisitesTest.php +++ b/tests/Unit/Import/Prerequisites/YnabPrerequisitesTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class YnabPrerequisitesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class YnabPrerequisitesTest extends TestCase { diff --git a/tests/Unit/Import/Routine/BunqRoutineTest.php b/tests/Unit/Import/Routine/BunqRoutineTest.php index c78e1d5631..0b7a1a052a 100644 --- a/tests/Unit/Import/Routine/BunqRoutineTest.php +++ b/tests/Unit/Import/Routine/BunqRoutineTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class BunqRoutineTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BunqRoutineTest extends TestCase { diff --git a/tests/Unit/Import/Routine/FakeRoutineTest.php b/tests/Unit/Import/Routine/FakeRoutineTest.php index 24db7d24f2..e9d304e559 100644 --- a/tests/Unit/Import/Routine/FakeRoutineTest.php +++ b/tests/Unit/Import/Routine/FakeRoutineTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class FakeRoutineTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FakeRoutineTest extends TestCase { diff --git a/tests/Unit/Import/Routine/FileRoutineTest.php b/tests/Unit/Import/Routine/FileRoutineTest.php index d9eac4ad69..c69e8a6c72 100644 --- a/tests/Unit/Import/Routine/FileRoutineTest.php +++ b/tests/Unit/Import/Routine/FileRoutineTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class FileRoutineTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FileRoutineTest extends TestCase { diff --git a/tests/Unit/Import/Routine/FinTSRoutineTest.php b/tests/Unit/Import/Routine/FinTSRoutineTest.php index 6537b456f3..4559701ef4 100644 --- a/tests/Unit/Import/Routine/FinTSRoutineTest.php +++ b/tests/Unit/Import/Routine/FinTSRoutineTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class FinTSRoutineTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FinTSRoutineTest extends TestCase { diff --git a/tests/Unit/Import/Routine/SpectreRoutineTest.php b/tests/Unit/Import/Routine/SpectreRoutineTest.php index a540c3cec5..2212ee878d 100644 --- a/tests/Unit/Import/Routine/SpectreRoutineTest.php +++ b/tests/Unit/Import/Routine/SpectreRoutineTest.php @@ -37,6 +37,9 @@ use Tests\TestCase; /** * Class SpectreRoutineTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SpectreRoutineTest extends TestCase { diff --git a/tests/Unit/Import/Routine/YnabRoutineTest.php b/tests/Unit/Import/Routine/YnabRoutineTest.php index b3eed7c484..431c4a9bb7 100644 --- a/tests/Unit/Import/Routine/YnabRoutineTest.php +++ b/tests/Unit/Import/Routine/YnabRoutineTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class YnabRoutineTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class YnabRoutineTest extends TestCase { diff --git a/tests/Unit/Import/Specifics/AbnAmroDescriptionTest.php b/tests/Unit/Import/Specifics/AbnAmroDescriptionTest.php index ed1d5bb099..679e87b1cd 100644 --- a/tests/Unit/Import/Specifics/AbnAmroDescriptionTest.php +++ b/tests/Unit/Import/Specifics/AbnAmroDescriptionTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class AbnAmroDescriptionTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AbnAmroDescriptionTest extends TestCase { diff --git a/tests/Unit/Import/Specifics/BelfiusTest.php b/tests/Unit/Import/Specifics/BelfiusTest.php index cee851cb31..195a88fef7 100644 --- a/tests/Unit/Import/Specifics/BelfiusTest.php +++ b/tests/Unit/Import/Specifics/BelfiusTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class BelfiusTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BelfiusTest extends TestCase { diff --git a/tests/Unit/Import/Specifics/IngBelgiumTest.php b/tests/Unit/Import/Specifics/IngBelgiumTest.php index 8201f4a0c1..f477f3cbce 100644 --- a/tests/Unit/Import/Specifics/IngBelgiumTest.php +++ b/tests/Unit/Import/Specifics/IngBelgiumTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class IngBelgiumTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IngBelgiumTest extends TestCase { diff --git a/tests/Unit/Import/Specifics/IngDescriptionTest.php b/tests/Unit/Import/Specifics/IngDescriptionTest.php index 1cee4ca664..d6d17c43da 100644 --- a/tests/Unit/Import/Specifics/IngDescriptionTest.php +++ b/tests/Unit/Import/Specifics/IngDescriptionTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class IngDescriptionTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IngDescriptionTest extends TestCase { diff --git a/tests/Unit/Import/Specifics/PresidentsChoiceTest.php b/tests/Unit/Import/Specifics/PresidentsChoiceTest.php index 909acd614f..2387cdbc8b 100644 --- a/tests/Unit/Import/Specifics/PresidentsChoiceTest.php +++ b/tests/Unit/Import/Specifics/PresidentsChoiceTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class PresidentsChoiceTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PresidentsChoiceTest extends TestCase { diff --git a/tests/Unit/Import/Specifics/SnsDescriptionTest.php b/tests/Unit/Import/Specifics/SnsDescriptionTest.php index dda090f422..fa6b02b0c0 100644 --- a/tests/Unit/Import/Specifics/SnsDescriptionTest.php +++ b/tests/Unit/Import/Specifics/SnsDescriptionTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class SnsDescriptionTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SnsDescriptionTest extends TestCase { diff --git a/tests/Unit/Import/Storage/ImportArrayStorageTest.php b/tests/Unit/Import/Storage/ImportArrayStorageTest.php index d79e985a7e..7ca7841e48 100644 --- a/tests/Unit/Import/Storage/ImportArrayStorageTest.php +++ b/tests/Unit/Import/Storage/ImportArrayStorageTest.php @@ -47,6 +47,9 @@ use Tests\TestCase; /** * Class ImportArrayStorageTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ImportArrayStorageTest extends TestCase { diff --git a/tests/Unit/Jobs/CreateRecurringTransactionsTest.php b/tests/Unit/Jobs/CreateRecurringTransactionsTest.php index ceaf3ecb12..4a43b9a592 100644 --- a/tests/Unit/Jobs/CreateRecurringTransactionsTest.php +++ b/tests/Unit/Jobs/CreateRecurringTransactionsTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class CreateRecurringTransactionsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CreateRecurringTransactionsTest extends TestCase { diff --git a/tests/Unit/Middleware/AuthenticateTest.php b/tests/Unit/Middleware/AuthenticateTest.php index 591e0c3b74..342874023c 100644 --- a/tests/Unit/Middleware/AuthenticateTest.php +++ b/tests/Unit/Middleware/AuthenticateTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class AuthenticateTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AuthenticateTest extends TestCase { diff --git a/tests/Unit/Middleware/BinderTest.php b/tests/Unit/Middleware/BinderTest.php index f6c4658271..bf9da21780 100644 --- a/tests/Unit/Middleware/BinderTest.php +++ b/tests/Unit/Middleware/BinderTest.php @@ -48,6 +48,9 @@ use Tests\TestCase; /** * Class BinderTest * Per object: works, not existing, not logged in + existing + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BinderTest extends TestCase { diff --git a/tests/Unit/Middleware/IsAdminTest.php b/tests/Unit/Middleware/IsAdminTest.php index 4ed7621f6e..24a016308b 100644 --- a/tests/Unit/Middleware/IsAdminTest.php +++ b/tests/Unit/Middleware/IsAdminTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class IsAdminTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IsAdminTest extends TestCase { diff --git a/tests/Unit/Middleware/IsDemoUserTest.php b/tests/Unit/Middleware/IsDemoUserTest.php index 2a32a56f6d..15f7255ce1 100644 --- a/tests/Unit/Middleware/IsDemoUserTest.php +++ b/tests/Unit/Middleware/IsDemoUserTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class IsDemoUserTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IsDemoUserTest extends TestCase { diff --git a/tests/Unit/Middleware/IsSandstormUserTest.php b/tests/Unit/Middleware/IsSandstormUserTest.php index 7a3a9ec20c..980cd5788e 100644 --- a/tests/Unit/Middleware/IsSandstormUserTest.php +++ b/tests/Unit/Middleware/IsSandstormUserTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class IsSandstormUserTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IsSandstormUserTest extends TestCase { diff --git a/tests/Unit/Middleware/RangeTest.php b/tests/Unit/Middleware/RangeTest.php index 1aed44718d..3ab1f92b6c 100644 --- a/tests/Unit/Middleware/RangeTest.php +++ b/tests/Unit/Middleware/RangeTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class RangeTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RangeTest extends TestCase { diff --git a/tests/Unit/Middleware/RedirectIfAuthenticatedTest.php b/tests/Unit/Middleware/RedirectIfAuthenticatedTest.php index 7d6946ad3d..5964c90dad 100644 --- a/tests/Unit/Middleware/RedirectIfAuthenticatedTest.php +++ b/tests/Unit/Middleware/RedirectIfAuthenticatedTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class RedirectIfAuthenticatedTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RedirectIfAuthenticatedTest extends TestCase { diff --git a/tests/Unit/Middleware/SandstormTest.php b/tests/Unit/Middleware/SandstormTest.php index d5a9ad3e53..737143a227 100644 --- a/tests/Unit/Middleware/SandstormTest.php +++ b/tests/Unit/Middleware/SandstormTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class RangeTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SandstormTest extends TestCase { diff --git a/tests/Unit/Middleware/SecureHeadersTest.php b/tests/Unit/Middleware/SecureHeadersTest.php index 84cce7cf62..bb59b2dd34 100644 --- a/tests/Unit/Middleware/SecureHeadersTest.php +++ b/tests/Unit/Middleware/SecureHeadersTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class SecureHeadersTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SecureHeadersTest extends TestCase { diff --git a/tests/Unit/Rules/BelongsUserTest.php b/tests/Unit/Rules/BelongsUserTest.php index 4eca8eddfb..a87dda1b04 100644 --- a/tests/Unit/Rules/BelongsUserTest.php +++ b/tests/Unit/Rules/BelongsUserTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class BelongsUserTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BelongsUserTest extends TestCase { diff --git a/tests/Unit/Rules/IsAssetAccountIdTest.php b/tests/Unit/Rules/IsAssetAccountIdTest.php index 523bf7b635..55a02c015c 100644 --- a/tests/Unit/Rules/IsAssetAccountIdTest.php +++ b/tests/Unit/Rules/IsAssetAccountIdTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class IsAssetAccountIdTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IsAssetAccountIdTest extends TestCase { diff --git a/tests/Unit/Rules/IsBooleanTest.php b/tests/Unit/Rules/IsBooleanTest.php index d86004d2b0..ccf0e18a0e 100644 --- a/tests/Unit/Rules/IsBooleanTest.php +++ b/tests/Unit/Rules/IsBooleanTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class IsBooleanTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IsBooleanTest extends TestCase { diff --git a/tests/Unit/Rules/IsDateOrTimeTest.php b/tests/Unit/Rules/IsDateOrTimeTest.php index b2bde0f594..0f81c96816 100644 --- a/tests/Unit/Rules/IsDateOrTimeTest.php +++ b/tests/Unit/Rules/IsDateOrTimeTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class IsDateOrTimeTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IsDateOrTimeTest extends TestCase { diff --git a/tests/Unit/Rules/IsValidAttachmentModelTest.php b/tests/Unit/Rules/IsValidAttachmentModelTest.php index b3da7794d3..527467294b 100644 --- a/tests/Unit/Rules/IsValidAttachmentModelTest.php +++ b/tests/Unit/Rules/IsValidAttachmentModelTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class IsValidAttachmentModelTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class IsValidAttachmentModelTest extends TestCase { diff --git a/tests/Unit/Rules/UniqueIbanTest.php b/tests/Unit/Rules/UniqueIbanTest.php index 97e09431b2..40b9f0b5fc 100644 --- a/tests/Unit/Rules/UniqueIbanTest.php +++ b/tests/Unit/Rules/UniqueIbanTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class UniqueIbanTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class UniqueIbanTest extends TestCase { diff --git a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php index 06b9d8c345..f3c9f7add6 100644 --- a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php +++ b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class AccountDestroyServiceTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AccountDestroyServiceTest extends TestCase { diff --git a/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php b/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php index 65fff25a90..88950da7dc 100644 --- a/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php +++ b/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * Class AccountUpdateServiceTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AccountUpdateServiceTest extends TestCase { diff --git a/tests/Unit/Support/Cronjobs/RecurringCronjobTest.php b/tests/Unit/Support/Cronjobs/RecurringCronjobTest.php index 10cccc2ac6..89a6b672fc 100644 --- a/tests/Unit/Support/Cronjobs/RecurringCronjobTest.php +++ b/tests/Unit/Support/Cronjobs/RecurringCronjobTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class RecurringCronjobTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RecurringCronjobTest extends TestCase { diff --git a/tests/Unit/Support/FinTS/MetadataParserTest.php b/tests/Unit/Support/FinTS/MetadataParserTest.php index 72d9f78758..4a632501a3 100644 --- a/tests/Unit/Support/FinTS/MetadataParserTest.php +++ b/tests/Unit/Support/FinTS/MetadataParserTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * * Class MetadataParserTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MetadataParserTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php index f3c935f22e..05d3aa6830 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php @@ -41,6 +41,9 @@ use Tests\TestCase; /** * Class ChooseAccountsHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ChooseAccountsHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php index 3e8fa4bf8d..7c9c2549f2 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class NewBunqJobHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NewBunqJobHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php index feec1aa1d0..980efc868c 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php @@ -41,6 +41,9 @@ use Tests\TestCase; /** * Class ConfigureMappingHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) * */ class ConfigureMappingHandlerTest extends TestCase diff --git a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php index f753ddb0a3..07dd1d7e19 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php @@ -40,6 +40,9 @@ use Tests\TestCase; /** * Class ConfigureRolesHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ConfigureRolesHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php index d2e7fd5c5b..513241ab76 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class ConfigureUploadHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ConfigureUploadHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php index c6e0b771fe..c141a9ce9a 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php @@ -37,6 +37,9 @@ use Tests\TestCase; /** * Class NewFileJobHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NewFileJobHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php index 3b304e9af5..f0f52b6221 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php @@ -44,6 +44,9 @@ use Tests\TestCase; /** * Class ChooseAccountsHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ChooseAccountsHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php index 53cb425b43..646ba05578 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php @@ -42,6 +42,9 @@ use Tests\TestCase; /** * Class ChooseLoginHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ChooseLoginHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php index 7121e50f33..5f6d01bd82 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * Class DoAuthenticateHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DoAuthenticateHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php b/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php index c821a5ce2b..272612ecf0 100644 --- a/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php +++ b/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class ImportTransactionTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ImportTransactionTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php b/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php index 4d70f988f8..69618a2a49 100644 --- a/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php @@ -48,6 +48,9 @@ use Tests\TestCase; /** * Class StageImportDataHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class StageImportDataHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php b/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php index 57c688f3ed..098b89f4a2 100644 --- a/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php @@ -48,6 +48,9 @@ use Tests\TestCase; /** * Class StageNewHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class StageNewHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/AssetAccountMapperTest.php b/tests/Unit/Support/Import/Routine/File/AssetAccountMapperTest.php index a8a7027507..723e5ed055 100644 --- a/tests/Unit/Support/Import/Routine/File/AssetAccountMapperTest.php +++ b/tests/Unit/Support/Import/Routine/File/AssetAccountMapperTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class AssetAccountMapperTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AssetAccountMapperTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/CSVProcessorTest.php b/tests/Unit/Support/Import/Routine/File/CSVProcessorTest.php index 78281802a2..cb1d3c8f72 100644 --- a/tests/Unit/Support/Import/Routine/File/CSVProcessorTest.php +++ b/tests/Unit/Support/Import/Routine/File/CSVProcessorTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; * Do some end to end testing here, perhaps? * * Class CSVProcessorTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CSVProcessorTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/CurrencyMapperTest.php b/tests/Unit/Support/Import/Routine/File/CurrencyMapperTest.php index 0c031dea1d..597dcade4b 100644 --- a/tests/Unit/Support/Import/Routine/File/CurrencyMapperTest.php +++ b/tests/Unit/Support/Import/Routine/File/CurrencyMapperTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class CurrencyMapperTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CurrencyMapperTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/ImportableConverterTest.php b/tests/Unit/Support/Import/Routine/File/ImportableConverterTest.php index 3bdd9b0198..4371777029 100644 --- a/tests/Unit/Support/Import/Routine/File/ImportableConverterTest.php +++ b/tests/Unit/Support/Import/Routine/File/ImportableConverterTest.php @@ -45,6 +45,9 @@ use Tests\TestCase; * todo test foreign currency * * Class ImportableConverterTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ImportableConverterTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/ImportableCreatorTest.php b/tests/Unit/Support/Import/Routine/File/ImportableCreatorTest.php index 9fb8eaeee2..f3d5638a99 100644 --- a/tests/Unit/Support/Import/Routine/File/ImportableCreatorTest.php +++ b/tests/Unit/Support/Import/Routine/File/ImportableCreatorTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class ImportableCreatorTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ImportableCreatorTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/LineReaderTest.php b/tests/Unit/Support/Import/Routine/File/LineReaderTest.php index db3cb35f10..f0563ba11d 100644 --- a/tests/Unit/Support/Import/Routine/File/LineReaderTest.php +++ b/tests/Unit/Support/Import/Routine/File/LineReaderTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * Class LineReaderTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class LineReaderTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php b/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php index 4c5ab76849..cc7d813022 100644 --- a/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php +++ b/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php @@ -39,6 +39,9 @@ use Tests\TestCase; /** * Class MappedValuesValidatorTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MappedValuesValidatorTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php b/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php index 856d5a2b5f..66caf7bb1b 100644 --- a/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php +++ b/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class MappingConvergerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class MappingConvergerTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/File/OpposingAccountMapperTest.php b/tests/Unit/Support/Import/Routine/File/OpposingAccountMapperTest.php index 631b071e74..68b5b0a9f7 100644 --- a/tests/Unit/Support/Import/Routine/File/OpposingAccountMapperTest.php +++ b/tests/Unit/Support/Import/Routine/File/OpposingAccountMapperTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class OpposingAccountMapperTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class OpposingAccountMapperTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php b/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php index 5411fa8e80..ead700d96a 100644 --- a/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php @@ -42,6 +42,9 @@ use Tests\TestCase; /** * Class StageAuthenticatedHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class StageAuthenticatedHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php b/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php index b3a7d33e89..978f01cf78 100644 --- a/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php @@ -40,6 +40,9 @@ use Tests\TestCase; /** * Class StageImportDataHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class StageImportDataHandlerTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php b/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php index 8e72f72b49..f61c089d8d 100644 --- a/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php @@ -43,6 +43,9 @@ use Tests\TestCase; /** * Class StageNewHandlerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class StageNewHandlerTest extends TestCase { diff --git a/tests/Unit/Support/NavigationTest.php b/tests/Unit/Support/NavigationTest.php index d551748eec..6141bbca4d 100644 --- a/tests/Unit/Support/NavigationTest.php +++ b/tests/Unit/Support/NavigationTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class NavigationTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NavigationTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/AddTagTest.php b/tests/Unit/TransactionRules/Actions/AddTagTest.php index e59f426e0c..017f84b284 100644 --- a/tests/Unit/TransactionRules/Actions/AddTagTest.php +++ b/tests/Unit/TransactionRules/Actions/AddTagTest.php @@ -30,6 +30,10 @@ use Tests\TestCase; /** * Class AddTagTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AddTagTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php b/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php index ccd90bf204..841b1c3865 100644 --- a/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php +++ b/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class AppendDescriptionTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AppendDescriptionTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/AppendNotesTest.php b/tests/Unit/TransactionRules/Actions/AppendNotesTest.php index 35cb34f279..fdacf21f68 100644 --- a/tests/Unit/TransactionRules/Actions/AppendNotesTest.php +++ b/tests/Unit/TransactionRules/Actions/AppendNotesTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class AppendNotesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AppendNotesTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/ClearBudgetTest.php b/tests/Unit/TransactionRules/Actions/ClearBudgetTest.php index eb44a61107..4e0d9109d8 100644 --- a/tests/Unit/TransactionRules/Actions/ClearBudgetTest.php +++ b/tests/Unit/TransactionRules/Actions/ClearBudgetTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class ClearBudgetTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ClearBudgetTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/ClearCategoryTest.php b/tests/Unit/TransactionRules/Actions/ClearCategoryTest.php index dfbfd8904d..f840310aae 100644 --- a/tests/Unit/TransactionRules/Actions/ClearCategoryTest.php +++ b/tests/Unit/TransactionRules/Actions/ClearCategoryTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class ClearCategoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ClearCategoryTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/ClearNotesTest.php b/tests/Unit/TransactionRules/Actions/ClearNotesTest.php index 3379ef87b2..f36410fec0 100644 --- a/tests/Unit/TransactionRules/Actions/ClearNotesTest.php +++ b/tests/Unit/TransactionRules/Actions/ClearNotesTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class ClearNotesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ClearNotesTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/ConvertToDepositTest.php b/tests/Unit/TransactionRules/Actions/ConvertToDepositTest.php index 79190b0d90..06369fa2ad 100644 --- a/tests/Unit/TransactionRules/Actions/ConvertToDepositTest.php +++ b/tests/Unit/TransactionRules/Actions/ConvertToDepositTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * * Class ConvertToDepositTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ConvertToDepositTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/ConvertToTransferTest.php b/tests/Unit/TransactionRules/Actions/ConvertToTransferTest.php index d79fe0fd86..347d7de586 100644 --- a/tests/Unit/TransactionRules/Actions/ConvertToTransferTest.php +++ b/tests/Unit/TransactionRules/Actions/ConvertToTransferTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * * Class ConvertToTransferTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ConvertToTransferTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/ConvertToWithdrawalTest.php b/tests/Unit/TransactionRules/Actions/ConvertToWithdrawalTest.php index d65c447d6c..1af20e7e26 100644 --- a/tests/Unit/TransactionRules/Actions/ConvertToWithdrawalTest.php +++ b/tests/Unit/TransactionRules/Actions/ConvertToWithdrawalTest.php @@ -36,6 +36,9 @@ use Tests\TestCase; /** * * Class ConvertToWithdrawalTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ConvertToWithdrawalTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/LinkToBillTest.php b/tests/Unit/TransactionRules/Actions/LinkToBillTest.php index 92d0e4d80c..a805dbca96 100644 --- a/tests/Unit/TransactionRules/Actions/LinkToBillTest.php +++ b/tests/Unit/TransactionRules/Actions/LinkToBillTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class LinkToBillTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class LinkToBillTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php b/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php index 2fecc0b909..bc831a7476 100644 --- a/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php +++ b/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class PrependDescriptionTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PrependDescriptionTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/PrependNotesTest.php b/tests/Unit/TransactionRules/Actions/PrependNotesTest.php index 1cd0d7430e..d2a985492d 100644 --- a/tests/Unit/TransactionRules/Actions/PrependNotesTest.php +++ b/tests/Unit/TransactionRules/Actions/PrependNotesTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class PrependNotesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PrependNotesTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php b/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php index 3844c5df6f..ef9201bc6c 100644 --- a/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php +++ b/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class RemoveAllTagsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RemoveAllTagsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/RemoveTagTest.php b/tests/Unit/TransactionRules/Actions/RemoveTagTest.php index 5cff507acb..d97bc6d524 100644 --- a/tests/Unit/TransactionRules/Actions/RemoveTagTest.php +++ b/tests/Unit/TransactionRules/Actions/RemoveTagTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class RemoveTagTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RemoveTagTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/SetBudgetTest.php b/tests/Unit/TransactionRules/Actions/SetBudgetTest.php index e9e48d7cc2..e5245f8453 100644 --- a/tests/Unit/TransactionRules/Actions/SetBudgetTest.php +++ b/tests/Unit/TransactionRules/Actions/SetBudgetTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class SetBudgetTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SetBudgetTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/SetCategoryTest.php b/tests/Unit/TransactionRules/Actions/SetCategoryTest.php index fd5a8e4508..a2f0513d6b 100644 --- a/tests/Unit/TransactionRules/Actions/SetCategoryTest.php +++ b/tests/Unit/TransactionRules/Actions/SetCategoryTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class SetCategoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SetCategoryTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php b/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php index 18fb81b894..936efb3857 100644 --- a/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php +++ b/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class SetDescriptionTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SetDescriptionTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php b/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php index b0e2f80384..29ba0220e7 100644 --- a/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php +++ b/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; * Try split journal * * Class SetDestinationAccountTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SetDestinationAccountTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/SetNotesTest.php b/tests/Unit/TransactionRules/Actions/SetNotesTest.php index e72b25a79f..2a116488af 100644 --- a/tests/Unit/TransactionRules/Actions/SetNotesTest.php +++ b/tests/Unit/TransactionRules/Actions/SetNotesTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class SetNotesTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SetNotesTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php b/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php index 4ec0b63ecb..86276da70f 100644 --- a/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php +++ b/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class SetSourceAccountTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SetSourceAccountTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php b/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php index dda6bec7c7..998f94b6e8 100644 --- a/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php +++ b/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class AmountExactlyTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountExactlyTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/AmountLessTest.php b/tests/Unit/TransactionRules/Triggers/AmountLessTest.php index 720a641e1c..2ecabf2bac 100644 --- a/tests/Unit/TransactionRules/Triggers/AmountLessTest.php +++ b/tests/Unit/TransactionRules/Triggers/AmountLessTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class AmountLessTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountLessTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/AmountMoreTest.php b/tests/Unit/TransactionRules/Triggers/AmountMoreTest.php index e6fce2e1a8..7e80a967a5 100644 --- a/tests/Unit/TransactionRules/Triggers/AmountMoreTest.php +++ b/tests/Unit/TransactionRules/Triggers/AmountMoreTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class AmountMoreTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AmountMoreTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/BudgetIsTest.php b/tests/Unit/TransactionRules/Triggers/BudgetIsTest.php index eefcf800ad..3c6a04b8e4 100644 --- a/tests/Unit/TransactionRules/Triggers/BudgetIsTest.php +++ b/tests/Unit/TransactionRules/Triggers/BudgetIsTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class BudgetIsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetIsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/CategoryIsTest.php b/tests/Unit/TransactionRules/Triggers/CategoryIsTest.php index 00ffac19a3..ba3542f860 100644 --- a/tests/Unit/TransactionRules/Triggers/CategoryIsTest.php +++ b/tests/Unit/TransactionRules/Triggers/CategoryIsTest.php @@ -27,6 +27,9 @@ use Tests\TestCase; /** * Class CategoryIsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CategoryIsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.php index 964b262cf2..de9d7034e2 100644 --- a/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.php +++ b/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class DescriptionContains + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DescriptionContainsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.php index 682e96bb0f..41711ab205 100644 --- a/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.php +++ b/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class DescriptionEnds + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DescriptionEndsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php index 2bb9760a75..23832ebea1 100644 --- a/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php +++ b/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class DescriptionIs + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DescriptionIsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.php index 79e134a15a..99f66f342b 100644 --- a/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.php +++ b/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class DescriptionStarts + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DescriptionStartsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.php index 963bf570cf..99b253d6dd 100644 --- a/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.php +++ b/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class FromAccountContainsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FromAccountContainsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.php index 13b2afc595..2da9ec36ad 100644 --- a/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.php +++ b/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class FromAccountEndsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FromAccountEndsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php index 9f4aa7a40c..f6a9866db4 100644 --- a/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php +++ b/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class FromAccountIsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FromAccountIsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.php index 946ff044e0..d31e6fc83a 100644 --- a/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.php +++ b/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class FromAccountStartsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FromAccountStartsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php b/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php index 70b4535796..f7bd73d40d 100644 --- a/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php +++ b/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class HasAnyBudgetTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HasAnyBudgetTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/HasAnyCategoryTest.php b/tests/Unit/TransactionRules/Triggers/HasAnyCategoryTest.php index b00f0cb502..2d1d85cf12 100644 --- a/tests/Unit/TransactionRules/Triggers/HasAnyCategoryTest.php +++ b/tests/Unit/TransactionRules/Triggers/HasAnyCategoryTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class HasAnyCategoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HasAnyCategoryTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php b/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php index 2ae4c2b9d2..3d1e16b740 100644 --- a/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php +++ b/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class HasAnyTagTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HasAnyTagTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php b/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php index 6a9e7376ee..f47f4bce27 100644 --- a/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php +++ b/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class HasAttachmentTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HasAttachmentTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php b/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php index 3caa876dca..d5be80026e 100644 --- a/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php +++ b/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class HasNoBudgetTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HasNoBudgetTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php b/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php index 0787df027d..5c6b55f593 100644 --- a/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php +++ b/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class HasNoCategoryTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HasNoCategoryTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/HasNoTagTest.php b/tests/Unit/TransactionRules/Triggers/HasNoTagTest.php index 771cd818ff..c1662f4b61 100644 --- a/tests/Unit/TransactionRules/Triggers/HasNoTagTest.php +++ b/tests/Unit/TransactionRules/Triggers/HasNoTagTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class HasNoTagTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class HasNoTagTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/NotesAnyTest.php b/tests/Unit/TransactionRules/Triggers/NotesAnyTest.php index 3ceed437c4..2dfe9180a4 100644 --- a/tests/Unit/TransactionRules/Triggers/NotesAnyTest.php +++ b/tests/Unit/TransactionRules/Triggers/NotesAnyTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class NotesAnyTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NotesAnyTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/NotesAreTest.php b/tests/Unit/TransactionRules/Triggers/NotesAreTest.php index 8160f5ebff..3f76ada49b 100644 --- a/tests/Unit/TransactionRules/Triggers/NotesAreTest.php +++ b/tests/Unit/TransactionRules/Triggers/NotesAreTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class NotesAreTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NotesAreTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/NotesContainTest.php b/tests/Unit/TransactionRules/Triggers/NotesContainTest.php index 2af0854b47..b1ba08019f 100644 --- a/tests/Unit/TransactionRules/Triggers/NotesContainTest.php +++ b/tests/Unit/TransactionRules/Triggers/NotesContainTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class NotesContainTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NotesContainTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php b/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php index 6eb2950148..2275f86830 100644 --- a/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php +++ b/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class NotesEmptyTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NotesEmptyTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/NotesEndTest.php b/tests/Unit/TransactionRules/Triggers/NotesEndTest.php index ab2e602dc3..9f06574137 100644 --- a/tests/Unit/TransactionRules/Triggers/NotesEndTest.php +++ b/tests/Unit/TransactionRules/Triggers/NotesEndTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class NotesEndTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NotesEndTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/NotesStartTest.php b/tests/Unit/TransactionRules/Triggers/NotesStartTest.php index 02f516206a..326485611c 100644 --- a/tests/Unit/TransactionRules/Triggers/NotesStartTest.php +++ b/tests/Unit/TransactionRules/Triggers/NotesStartTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class NotesStartTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class NotesStartTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/TagIsTest.php b/tests/Unit/TransactionRules/Triggers/TagIsTest.php index 7c0c386aa8..45d609616b 100644 --- a/tests/Unit/TransactionRules/Triggers/TagIsTest.php +++ b/tests/Unit/TransactionRules/Triggers/TagIsTest.php @@ -29,6 +29,9 @@ use Tests\TestCase; /** * Class TagIsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagIsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.php index 64d69c4d6f..f2bbfd9e4d 100644 --- a/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.php +++ b/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class ToAccountContainsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ToAccountContainsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php index ca048e696a..826c9e73da 100644 --- a/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php +++ b/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class ToAccountEndsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ToAccountEndsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php index 34c3c8d6d5..3e91256ec2 100644 --- a/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php +++ b/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class ToAccountIsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ToAccountIsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.php index e9de05b6ce..47e3d7dfca 100644 --- a/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.php +++ b/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.php @@ -30,6 +30,9 @@ use Tests\TestCase; /** * Class ToAccountStartsTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ToAccountStartsTest extends TestCase { diff --git a/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.php b/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.php index d3bf8f8476..8d739d4183 100644 --- a/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.php +++ b/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.php @@ -28,6 +28,9 @@ use Tests\TestCase; /** * Class TransactionTypeTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionTypeTest extends TestCase { diff --git a/tests/Unit/Transformers/AccountTransformerTest.php b/tests/Unit/Transformers/AccountTransformerTest.php index afa89868a9..ba79650f4d 100644 --- a/tests/Unit/Transformers/AccountTransformerTest.php +++ b/tests/Unit/Transformers/AccountTransformerTest.php @@ -35,6 +35,10 @@ use Tests\TestCase; /** * Class AccountTransformerTest + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AccountTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/AttachmentTransformerTest.php b/tests/Unit/Transformers/AttachmentTransformerTest.php index bda945afe6..4b5c540c44 100644 --- a/tests/Unit/Transformers/AttachmentTransformerTest.php +++ b/tests/Unit/Transformers/AttachmentTransformerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * Class AttachmentTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AttachmentTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/AvailableBudgetTransformerTest.php b/tests/Unit/Transformers/AvailableBudgetTransformerTest.php index baf9752ac0..6eda0821ba 100644 --- a/tests/Unit/Transformers/AvailableBudgetTransformerTest.php +++ b/tests/Unit/Transformers/AvailableBudgetTransformerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class AvailableBudgetTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AvailableBudgetTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/BillTransformerTest.php b/tests/Unit/Transformers/BillTransformerTest.php index bd78b724ce..f32605969c 100644 --- a/tests/Unit/Transformers/BillTransformerTest.php +++ b/tests/Unit/Transformers/BillTransformerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class BillTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BillTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/BudgetLimitTransformerTest.php b/tests/Unit/Transformers/BudgetLimitTransformerTest.php index e1b623f391..2c6093b26f 100644 --- a/tests/Unit/Transformers/BudgetLimitTransformerTest.php +++ b/tests/Unit/Transformers/BudgetLimitTransformerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * * Class BudgetLimitTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetLimitTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/BudgetTransformerTest.php b/tests/Unit/Transformers/BudgetTransformerTest.php index 31ebba5ae8..e8ae7e5d38 100644 --- a/tests/Unit/Transformers/BudgetTransformerTest.php +++ b/tests/Unit/Transformers/BudgetTransformerTest.php @@ -34,6 +34,9 @@ use Tests\TestCase; /** * Class BudgetTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BudgetTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/CategoryTransformerTest.php b/tests/Unit/Transformers/CategoryTransformerTest.php index 9a02261987..99b8b273b6 100644 --- a/tests/Unit/Transformers/CategoryTransformerTest.php +++ b/tests/Unit/Transformers/CategoryTransformerTest.php @@ -37,6 +37,9 @@ use Tests\TestCase; /** * Class CategoryTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CategoryTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/CurrencyExchangeRateTransformerTest.php b/tests/Unit/Transformers/CurrencyExchangeRateTransformerTest.php index d4d0a038ce..1f218c4047 100644 --- a/tests/Unit/Transformers/CurrencyExchangeRateTransformerTest.php +++ b/tests/Unit/Transformers/CurrencyExchangeRateTransformerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * * Class CurrencyExchangeRateTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CurrencyExchangeRateTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/CurrencyTransformerTest.php b/tests/Unit/Transformers/CurrencyTransformerTest.php index 6038cf9868..12f21f5d1e 100644 --- a/tests/Unit/Transformers/CurrencyTransformerTest.php +++ b/tests/Unit/Transformers/CurrencyTransformerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class CurrencyTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CurrencyTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/ImportJobTransformerTest.php b/tests/Unit/Transformers/ImportJobTransformerTest.php index 546ac89195..953391d4f6 100644 --- a/tests/Unit/Transformers/ImportJobTransformerTest.php +++ b/tests/Unit/Transformers/ImportJobTransformerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class ImportJobTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ImportJobTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/LinkTypeTransformerTest.php b/tests/Unit/Transformers/LinkTypeTransformerTest.php index 5988ce5a39..21dcd25c83 100644 --- a/tests/Unit/Transformers/LinkTypeTransformerTest.php +++ b/tests/Unit/Transformers/LinkTypeTransformerTest.php @@ -33,6 +33,9 @@ use Tests\TestCase; /** * * Class LinkTypeTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class LinkTypeTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/PiggyBankEventTransformerTest.php b/tests/Unit/Transformers/PiggyBankEventTransformerTest.php index 6bd8e234b7..c2ca10c1f6 100644 --- a/tests/Unit/Transformers/PiggyBankEventTransformerTest.php +++ b/tests/Unit/Transformers/PiggyBankEventTransformerTest.php @@ -37,6 +37,9 @@ use Tests\TestCase; /** * Class PiggyBankEventTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PiggyBankEventTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/PiggyBankTransformerTest.php b/tests/Unit/Transformers/PiggyBankTransformerTest.php index d66130a286..302612d106 100644 --- a/tests/Unit/Transformers/PiggyBankTransformerTest.php +++ b/tests/Unit/Transformers/PiggyBankTransformerTest.php @@ -37,6 +37,9 @@ use Tests\TestCase; /** * Class PiggyBankTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PiggyBankTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/PreferenceTransformerTest.php b/tests/Unit/Transformers/PreferenceTransformerTest.php index 4584b004a8..5c587d74d7 100644 --- a/tests/Unit/Transformers/PreferenceTransformerTest.php +++ b/tests/Unit/Transformers/PreferenceTransformerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class PreferenceTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PreferenceTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/RecurrenceTransformerTest.php b/tests/Unit/Transformers/RecurrenceTransformerTest.php index 467b0f8bef..c20e508362 100644 --- a/tests/Unit/Transformers/RecurrenceTransformerTest.php +++ b/tests/Unit/Transformers/RecurrenceTransformerTest.php @@ -38,6 +38,9 @@ use Tests\TestCase; /** * * Class RecurrenceTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RecurrenceTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/RuleGroupTransformerTest.php b/tests/Unit/Transformers/RuleGroupTransformerTest.php index c02ebe9aa5..103be10a60 100644 --- a/tests/Unit/Transformers/RuleGroupTransformerTest.php +++ b/tests/Unit/Transformers/RuleGroupTransformerTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class RuleGroupTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RuleGroupTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/RuleTransformerTest.php b/tests/Unit/Transformers/RuleTransformerTest.php index 447b6f132e..3489e453b0 100644 --- a/tests/Unit/Transformers/RuleTransformerTest.php +++ b/tests/Unit/Transformers/RuleTransformerTest.php @@ -35,6 +35,9 @@ use Tests\TestCase; /** * Class RuleTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RuleTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/TagTransformerTest.php b/tests/Unit/Transformers/TagTransformerTest.php index 34cdc02b0e..63e5624aa4 100644 --- a/tests/Unit/Transformers/TagTransformerTest.php +++ b/tests/Unit/Transformers/TagTransformerTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class TagTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/TransactionGroupTransformerTest.php b/tests/Unit/Transformers/TransactionGroupTransformerTest.php index 6f30836c9c..4e305ea225 100644 --- a/tests/Unit/Transformers/TransactionGroupTransformerTest.php +++ b/tests/Unit/Transformers/TransactionGroupTransformerTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class TransactionGroupTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionGroupTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/TransactionLinkTransformerTest.php b/tests/Unit/Transformers/TransactionLinkTransformerTest.php index 1ce10aae4b..06d7fc312c 100644 --- a/tests/Unit/Transformers/TransactionLinkTransformerTest.php +++ b/tests/Unit/Transformers/TransactionLinkTransformerTest.php @@ -32,6 +32,9 @@ use Tests\TestCase; /** * Class TransactionLinkTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TransactionLinkTransformerTest extends TestCase { diff --git a/tests/Unit/Transformers/UserTransformerTest.php b/tests/Unit/Transformers/UserTransformerTest.php index 9dfdcc3bb1..cd584341c8 100644 --- a/tests/Unit/Transformers/UserTransformerTest.php +++ b/tests/Unit/Transformers/UserTransformerTest.php @@ -31,6 +31,9 @@ use Tests\TestCase; /** * Class UserTransformerTest + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class UserTransformerTest extends TestCase { From 6d1bfd3956c80bd1f6301bf6742d7048ae67a91c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 10:54:16 +0200 Subject: [PATCH 58/65] Code cleanup --- .../Controllers/RecurrenceControllerTest.php | 1 + .../Chart/CategoryControllerTest.php | 1 + .../Controllers/ReportControllerTest.php | 1 + tests/TestCase.php | 1 + .../Import/Storage/ImportArrayStorageTest.php | 2 ++ tests/Unit/Middleware/BinderTest.php | 3 +++ .../Destroy/AccountDestroyServiceTest.php | 8 ++++---- .../Spectre/ChooseLoginHandlerTest.php | 8 ++++---- .../Placeholder/ImportTransactionTest.php | 2 ++ .../Routine/Bunq/StageNewHandlerTest.php | 18 +++++++++--------- .../Routine/File/MappedValuesValidatorTest.php | 6 +++--- 11 files changed, 31 insertions(+), 20 deletions(-) diff --git a/tests/Api/V1/Controllers/RecurrenceControllerTest.php b/tests/Api/V1/Controllers/RecurrenceControllerTest.php index 064b7b5850..8ad80b3fa2 100644 --- a/tests/Api/V1/Controllers/RecurrenceControllerTest.php +++ b/tests/Api/V1/Controllers/RecurrenceControllerTest.php @@ -38,6 +38,7 @@ use Tests\TestCase; * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * @SuppressWarnings(PHPMD.ExcessiveClassLength) */ class RecurrenceControllerTest extends TestCase { diff --git a/tests/Feature/Controllers/Chart/CategoryControllerTest.php b/tests/Feature/Controllers/Chart/CategoryControllerTest.php index cdca2234ac..89197731b8 100644 --- a/tests/Feature/Controllers/Chart/CategoryControllerTest.php +++ b/tests/Feature/Controllers/Chart/CategoryControllerTest.php @@ -60,6 +60,7 @@ class CategoryControllerTest extends TestCase * * @param string $range * @throws FireflyException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function testAll(string $range): void { diff --git a/tests/Feature/Controllers/ReportControllerTest.php b/tests/Feature/Controllers/ReportControllerTest.php index 6776d7d829..f49f4f9e2e 100644 --- a/tests/Feature/Controllers/ReportControllerTest.php +++ b/tests/Feature/Controllers/ReportControllerTest.php @@ -52,6 +52,7 @@ use Tests\TestCase; * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyMethods) */ class ReportControllerTest extends TestCase { diff --git a/tests/TestCase.php b/tests/TestCase.php index 416ba86f1a..600d3a7791 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -67,6 +67,7 @@ use RuntimeException; * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ abstract class TestCase extends BaseTestCase { diff --git a/tests/Unit/Import/Storage/ImportArrayStorageTest.php b/tests/Unit/Import/Storage/ImportArrayStorageTest.php index 7ca7841e48..b1633818db 100644 --- a/tests/Unit/Import/Storage/ImportArrayStorageTest.php +++ b/tests/Unit/Import/Storage/ImportArrayStorageTest.php @@ -50,6 +50,8 @@ use Tests\TestCase; * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * @SuppressWarnings(PHPMD.ExcessiveClassLength) + * */ class ImportArrayStorageTest extends TestCase { diff --git a/tests/Unit/Middleware/BinderTest.php b/tests/Unit/Middleware/BinderTest.php index bf9da21780..c6faa59688 100644 --- a/tests/Unit/Middleware/BinderTest.php +++ b/tests/Unit/Middleware/BinderTest.php @@ -51,6 +51,9 @@ use Tests\TestCase; * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * @SuppressWarnings(PHPMD.TooManyMethods) + * @SuppressWarnings(PHPMD.ExcessiveClassLength) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class BinderTest extends TestCase { diff --git a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php index f3c9f7add6..b8c9a7ab8c 100644 --- a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php +++ b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php @@ -78,8 +78,8 @@ class AccountDestroyServiceTest extends TestCase 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); - $recurrence = $this->getRandomRecurrence(); - $recurrenceTransaction = RecurrenceTransaction::create( + $recurrence = $this->getRandomRecurrence(); + $transaction = RecurrenceTransaction::create( [ 'recurrence_id' => $recurrence->id, 'transaction_currency_id' => $this->getEuro()->id, @@ -91,7 +91,7 @@ class AccountDestroyServiceTest extends TestCase ); $recService->shouldReceive('destroyById')->once() - ->withAnyArgs([$recurrenceTransaction->id]); + ->withAnyArgs([$transaction->id]); /** @var AccountDestroyService $service */ $service = app(AccountDestroyService::class); @@ -99,7 +99,7 @@ class AccountDestroyServiceTest extends TestCase $this->assertDatabaseMissing('accounts', ['id' => $account->id, 'deleted_at' => null]); - $recurrenceTransaction->forceDelete(); + $transaction->forceDelete(); } /** diff --git a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php index 646ba05578..2f16902cfd 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php @@ -142,9 +142,9 @@ class ChooseLoginHandlerTest extends TestCase public function testConfigureJobCustomer(): void { // fake Spectre customer: - $fakeCustomerPreference = new Preference; - $fakeCustomerPreference->name = 'spectre_customer'; - $fakeCustomerPreference->data = [ + $fakePref = new Preference; + $fakePref->name = 'spectre_customer'; + $fakePref->data = [ 'id' => 1, 'identifier' => 'fake', 'secret' => 'Dumbledore dies', @@ -167,7 +167,7 @@ class ChooseLoginHandlerTest extends TestCase // should try to grab customer from preferences: Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'spectre_customer', null]) - ->andReturn($fakeCustomerPreference)->once(); + ->andReturn($fakePref)->once(); // mock stuff $ctRequest = $this->mock(CreateTokenRequest::class); diff --git a/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php b/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php index 272612ecf0..308fbd735c 100644 --- a/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php +++ b/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php @@ -35,6 +35,8 @@ use Tests\TestCase; * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.TooManyPublicMethods) + * @SuppressWarnings(PHPMD.TooManyMethods) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class ImportTransactionTest extends TestCase { diff --git a/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php b/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php index 098b89f4a2..c59dd08afe 100644 --- a/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php @@ -85,7 +85,7 @@ class StageNewHandlerTest extends TestCase // create fake bunq object: $setting = new MonetaryAccountSetting(null, null, null); $mab = new BunqMonetaryAccountBank('EUR', 'Some descr', null, null, null, null, null, null, null, null); - $ma = new BunqMonetaryAccount; + $monAcc = new BunqMonetaryAccount; $alias = new Pointer('a', 'b', null); @@ -96,10 +96,10 @@ class StageNewHandlerTest extends TestCase $setting->setColor('FFFFFF'); $mab->setSetting($setting); $mab->setAlias([$alias]); - $ma->setMonetaryAccountBank($mab); + $monAcc->setMonetaryAccountBank($mab); // response list. - $list = new BunqResponseMonetaryAccountList([$ma], []); + $list = new BunqResponseMonetaryAccountList([$monAcc], []); $expectedConfig = [ 'accounts' => [ @@ -172,7 +172,7 @@ class StageNewHandlerTest extends TestCase // create fake bunq object: $setting = new MonetaryAccountSetting(null, null, null); $maj = new MonetaryAccountJoint('EUR', [], 'Some descr', null, null, null, null, null, null, null, null); - $ma = new BunqMonetaryAccount; + $monAcc = new BunqMonetaryAccount; $alias = new Pointer('a', 'b', null); $labelUser = new LabelUser('x', 'James', 'NL'); $coOwner = new CoOwner($alias); @@ -186,11 +186,11 @@ class StageNewHandlerTest extends TestCase $maj->setSetting($setting); $maj->setAlias([$alias]); $maj->setAllCoOwner([$coOwner]); - $ma->setMonetaryAccountJoint($maj); + $monAcc->setMonetaryAccountJoint($maj); $coOwner->setAlias($labelUser); // response list. - $list = new BunqResponseMonetaryAccountList([$ma], []); + $list = new BunqResponseMonetaryAccountList([$monAcc], []); $expectedConfig = [ 'accounts' => [ @@ -264,7 +264,7 @@ class StageNewHandlerTest extends TestCase // create fake bunq object: $setting = new MonetaryAccountSetting(null, null, null); $mal = new MonetaryAccountLight('EUR', 'Some descr', null, null, null, null, null, null, null, null); - $ma = new BunqMonetaryAccount; + $monAcc = new BunqMonetaryAccount; $alias = new Pointer('a', 'b', null); @@ -275,10 +275,10 @@ class StageNewHandlerTest extends TestCase $setting->setColor('FFFFFF'); $mal->setSetting($setting); $mal->setAlias([$alias]); - $ma->setMonetaryAccountLight($mal); + $monAcc->setMonetaryAccountLight($mal); // response list. - $list = new BunqResponseMonetaryAccountList([$ma], []); + $list = new BunqResponseMonetaryAccountList([$monAcc], []); $expectedConfig = [ 'accounts' => [ diff --git a/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php b/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php index cc7d813022..9704f09553 100644 --- a/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php +++ b/tests/Unit/Support/Import/Routine/File/MappedValuesValidatorTest.php @@ -125,14 +125,14 @@ class MappedValuesValidatorTest extends TestCase } /** - * @param int $id + * @param int $objectId * * @return stdClass */ - private function objectWithId(int $id): stdClass + private function objectWithId(int $objectId): stdClass { $obj = new stdClass(); - $obj->id = $id; + $obj->id = $objectId; return $obj; } From 1d4434698ef4d1b6a9c2fb0b7a65b49f15126e7d Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 11:32:05 +0200 Subject: [PATCH 59/65] Fix some tests. --- .../Chart/CategoryControllerTest.php | 10 +++---- .../Chart/ReportControllerTest.php | 17 ++++++++---- tests/Unit/Support/NavigationTest.php | 26 ------------------- .../Transformers/CategoryTransformerTest.php | 26 ++++++++++++------- 4 files changed, 33 insertions(+), 46 deletions(-) diff --git a/tests/Feature/Controllers/Chart/CategoryControllerTest.php b/tests/Feature/Controllers/Chart/CategoryControllerTest.php index 89197731b8..c37093ef87 100644 --- a/tests/Feature/Controllers/Chart/CategoryControllerTest.php +++ b/tests/Feature/Controllers/Chart/CategoryControllerTest.php @@ -98,10 +98,10 @@ class CategoryControllerTest extends TestCase $this->mockDefaultSession(); Preferences::shouldReceive('lastActivity')->atLeast()->once()->andReturn('md512345'); - $repository->shouldReceive('spentInPeriod')->andReturn('0')->atLeast()->once(); - $repository->shouldReceive('earnedInPeriod')->andReturn('0')->atLeast()->once(); + $repository->shouldReceive('spentInPeriod')->andReturn([])->atLeast()->once(); + $repository->shouldReceive('earnedInPeriod')->andReturn([])->atLeast()->once(); $repository->shouldReceive('firstUseDate')->andReturn($firstUseDate)->once(); - $accountRepos->shouldReceive('getAccountsByType')->withArgs([[AccountType::DEFAULT, AccountType::ASSET]])->andReturn(new Collection)->once(); + $accountRepos->shouldReceive('getAccountsByType')->withArgs([[AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT,AccountType::MORTGAGE]])->andReturn(new Collection)->once(); $generator->shouldReceive('multiSet')->once()->andReturn([]); $this->be($this->user()); @@ -245,8 +245,8 @@ class CategoryControllerTest extends TestCase $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); $accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection([$account])); - $repository->shouldReceive('spentInPeriod')->andReturn('0'); - $repository->shouldReceive('earnedInPeriod')->andReturn('0'); + $repository->shouldReceive('spentInPeriod')->andReturn([]); + $repository->shouldReceive('earnedInPeriod')->andReturn([]); $generator->shouldReceive('multiSet')->andReturn([])->once(); $this->be($this->user()); diff --git a/tests/Feature/Controllers/Chart/ReportControllerTest.php b/tests/Feature/Controllers/Chart/ReportControllerTest.php index f2c3ebd1a8..cadb24e0e6 100644 --- a/tests/Feature/Controllers/Chart/ReportControllerTest.php +++ b/tests/Feature/Controllers/Chart/ReportControllerTest.php @@ -26,7 +26,6 @@ use Carbon\Carbon; use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Helpers\Fiscal\FiscalHelperInterface; use FireflyIII\Helpers\Report\NetWorthInterface; -use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; @@ -116,8 +115,12 @@ class ReportControllerTest extends TestCase $fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date); $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); - $income = [1 => ['sum' => '100']]; - $expense = [2 => ['sum' => '-100']]; + $income = [ + 'accounts' => [ + 1 => ['sum' => '100']]]; + $expense = [ + 'accounts' => [ + 2 => ['sum' => '-100']]]; $tasker->shouldReceive('getIncomeReport')->once()->andReturn($income); $tasker->shouldReceive('getExpenseReport')->once()->andReturn($expense); $generator->shouldReceive('multiSet')->andReturn([]); @@ -144,8 +147,12 @@ class ReportControllerTest extends TestCase $fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date); $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); - $income = []; - $expense = []; + $income = [ + 'accounts' => [ + 1 => ['sum' => '100']]]; + $expense = [ + 'accounts' => [ + 2 => ['sum' => '-100']]]; $tasker->shouldReceive('getIncomeReport')->andReturn($income)->times(1); $tasker->shouldReceive('getExpenseReport')->andReturn($expense)->times(1); diff --git a/tests/Unit/Support/NavigationTest.php b/tests/Unit/Support/NavigationTest.php index 6141bbca4d..7c9db89d72 100644 --- a/tests/Unit/Support/NavigationTest.php +++ b/tests/Unit/Support/NavigationTest.php @@ -108,32 +108,6 @@ class NavigationTest extends TestCase } } - /** - * @covers \FireflyIII\Support\Navigation - */ - public function testAddPeriodError(): void - { - $tests = [ - // period, skip, start, expected end - ['bla', 0, '2018-01-01', '2018-01-02'], - ]; - - /** @var array $test */ - foreach ($tests as $test) { - - $freq = $test[0]; - /** @noinspection MultiAssignmentUsageInspection */ - $skip = $test[1]; - $start = new Carbon($test[2]); - $nav = new Navigation; - try { - $nav->addPeriod($start, $freq, $skip); - } catch (FireflyException $e) { - $this->assertEquals('Cannot do addPeriod for $repeat_freq "bla"', $e->getMessage()); - } - } - } - /** * @covers \FireflyIII\Support\Navigation */ diff --git a/tests/Unit/Transformers/CategoryTransformerTest.php b/tests/Unit/Transformers/CategoryTransformerTest.php index 99b8b273b6..8734a60f69 100644 --- a/tests/Unit/Transformers/CategoryTransformerTest.php +++ b/tests/Unit/Transformers/CategoryTransformerTest.php @@ -88,21 +88,27 @@ class CategoryTransformerTest extends TestCase $parameters->set('end', new Carbon('2018-01-31')); // mock some objects for the spent/earned lists. - $expense = new Transaction; - $expense->transaction_currency_code = 'EUR'; - $expense->transactionCurrency = $this->getEuro(); - $expense->transaction_amount = '-100'; - $income = new Transaction; - $income->transaction_currency_code = 'EUR'; - $income->transactionCurrency = $this->getEuro(); - $income->transaction_amount = '100'; + $expense = [ + 'currency_id' => 1, + 'currency_code' => 'EUR', + 'currency_symbol' => '€', + 'currency_decimal_places' => 2, + 'amount' => -100, + ]; + $income = [ + 'currency_id' => 1, + 'currency_code' => 'EUR', + 'currency_symbol' => '€', + 'currency_decimal_places' => 2, + 'amount' => 100, + ]; $incomeCollection = [$income]; $expenseCollection = [$expense]; - $repository->shouldReceive('spentInPeriodCollection')->atLeast()->once()->andReturn($expenseCollection); - $repository->shouldReceive('earnedInPeriodCollection')->atLeast()->once()->andReturn($incomeCollection); + $repository->shouldReceive('spentInPeriod')->atLeast()->once()->andReturn($expenseCollection); + $repository->shouldReceive('earnedInPeriod')->atLeast()->once()->andReturn($incomeCollection); /** @var Category $category */ $category = Category::first(); From b53cbbe46915ccb919aee2a5e40a7a607ba2c93c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 17 Aug 2019 12:08:09 +0200 Subject: [PATCH 60/65] Fix test coverage. --- app/Helpers/Report/PopupReport.php | 57 ++++++-- .../Controllers/Popup/ReportController.php | 3 - .../Controllers/Report/BalanceController.php | 10 +- .../Http/Controllers/RenderPartialViews.php | 51 ------- resources/lang/en_US/firefly.php | 2 +- resources/views/v1/popup/list/journals.twig | 10 +- .../v1/popup/report/budget-spent-amount.twig | 5 - .../views/v1/reports/partials/balance.twig | 5 +- .../views/v1/reports/partials/categories.twig | 4 +- .../v1/reports/partials/income-expenses.twig | 6 +- .../Popup/ReportControllerTest.php | 126 ++---------------- .../Report/BalanceControllerTest.php | 3 +- .../Report/BudgetControllerTest.php | 2 +- .../Report/CategoryControllerTest.php | 5 +- .../Report/OperationsControllerTest.php | 3 +- .../Controllers/Rule/SelectControllerTest.php | 4 +- 16 files changed, 83 insertions(+), 213 deletions(-) diff --git a/app/Helpers/Report/PopupReport.php b/app/Helpers/Report/PopupReport.php index e93ef9f56c..1b8ab5a0f3 100644 --- a/app/Helpers/Report/PopupReport.php +++ b/app/Helpers/Report/PopupReport.php @@ -27,6 +27,7 @@ use FireflyIII\Models\Account; use FireflyIII\Models\Budget; use FireflyIII\Models\Category; use FireflyIII\Models\TransactionType; +use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Support\Collection; use Log; @@ -97,11 +98,24 @@ class PopupReport implements PopupReportInterface */ public function byBudget(Budget $budget, array $attributes): array { + // filter by currency, if set. + $currencyId = $attributes['currencyId'] ?? null; + $currency = null; + if (null !== $currencyId) { + /** @var CurrencyRepositoryInterface $repos */ + $repos = app(CurrencyRepositoryInterface::class); + $currency = $repos->find((int)$currencyId); + } + + /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); - $collector->setAccounts($attributes['accounts'])->setRange($attributes['startDate'], $attributes['endDate']); + if (null !== $currency) { + $collector->setCurrency($currency); + } + if (null === $budget->id) { $collector->setTypes([TransactionType::WITHDRAWAL])->withoutBudget(); } @@ -122,12 +136,25 @@ class PopupReport implements PopupReportInterface */ public function byCategory(Category $category, array $attributes): array { + // filter by currency, if set. + $currencyId = $attributes['currencyId'] ?? null; + $currency = null; + if (null !== $currencyId) { + /** @var CurrencyRepositoryInterface $repos */ + $repos = app(CurrencyRepositoryInterface::class); + $currency = $repos->find((int)$currencyId); + } + /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); - $collector->setAccounts($attributes['accounts'])->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]) + $collector->setAccounts($attributes['accounts']) + ->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER, TransactionType::DEPOSIT]) ->setRange($attributes['startDate'], $attributes['endDate'])->withAccountInformation() ->setCategory($category); + if (null !== $currency) { + $collector->setCurrency($currency); + } return $collector->getExtractedJournals(); } @@ -142,6 +169,15 @@ class PopupReport implements PopupReportInterface */ public function byExpenses(Account $account, array $attributes): array { + // filter by currency, if set. + $currencyId = $attributes['currencyId'] ?? null; + $currency = null; + if (null !== $currencyId) { + /** @var CurrencyRepositoryInterface $repos */ + $repos = app(CurrencyRepositoryInterface::class); + $currency = $repos->find((int)$currencyId); + } + /** @var JournalRepositoryInterface $repository */ $repository = app(JournalRepositoryInterface::class); $repository->setUser($account->user); @@ -149,20 +185,15 @@ class PopupReport implements PopupReportInterface /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); - $collector->setAccounts(new Collection([$account]))->setRange($attributes['startDate'], $attributes['endDate']) + $collector->setAccounts(new Collection([$account])) + ->setRange($attributes['startDate'], $attributes['endDate']) ->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]); - $journals = $collector->getExtractedJournals(); - $report = $attributes['accounts']->pluck('id')->toArray(); // accounts used in this report - $filtered = []; - // TODO not sure if filter is necessary. - /** @var array $journal */ - foreach ($journals as $journal) { - if (in_array($journal['source_account_id'], $report, true)) { - $filtered[] = $journal; - } + if (null !== $currency) { + $collector->setCurrency($currency); } - return $filtered; + + return $collector->getExtractedJournals(); } /** diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index 15956dd034..22b5c32f40 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -69,9 +69,6 @@ class ReportController extends Controller case 'category-entry': $html = $this->categoryEntry($attributes); break; - case 'balance-amount': - $html = $this->balanceAmount($attributes); - break; } return response()->json(['html' => $html]); diff --git a/app/Http/Controllers/Report/BalanceController.php b/app/Http/Controllers/Report/BalanceController.php index 25ac0f23cf..269cf73685 100644 --- a/app/Http/Controllers/Report/BalanceController.php +++ b/app/Http/Controllers/Report/BalanceController.php @@ -59,13 +59,13 @@ class BalanceController extends Controller $helper = app(BalanceReportHelperInterface::class); $report = $helper->getBalanceReport($accounts, $start, $end); // TODO no budget. -// try { + try { $result = view('reports.partials.balance', compact('report'))->render(); // @codeCoverageIgnoreStart -// } catch (Throwable $e) { -// Log::debug(sprintf('Could not render reports.partials.balance: %s', $e->getMessage())); -// $result = 'Could not render view.'; -// } + } catch (Throwable $e) { + Log::debug(sprintf('Could not render reports.partials.balance: %s', $e->getMessage())); + $result = 'Could not render view.'; + } // @codeCoverageIgnoreEnd $cache->store($result); diff --git a/app/Support/Http/Controllers/RenderPartialViews.php b/app/Support/Http/Controllers/RenderPartialViews.php index 5a2267d475..b97ce71663 100644 --- a/app/Support/Http/Controllers/RenderPartialViews.php +++ b/app/Support/Http/Controllers/RenderPartialViews.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace FireflyIII\Support\Http\Controllers; -use FireflyIII\Helpers\Collection\BalanceLine; use FireflyIII\Helpers\Report\PopupReportInterface; use FireflyIII\Models\AccountType; use FireflyIII\Models\Budget; @@ -76,56 +75,6 @@ trait RenderPartialViews return $result; } - /** - * View for balance row. - * - * @param array $attributes - * - * @return string - * - * - */ - protected function balanceAmount(array $attributes): string // generate view for report. - { - $role = (int)$attributes['role']; - /** @var BudgetRepositoryInterface $budgetRepository */ - $budgetRepository = app(BudgetRepositoryInterface::class); - - /** @var AccountRepositoryInterface $accountRepository */ - $accountRepository = app(AccountRepositoryInterface::class); - - /** @var PopupReportInterface $popupHelper */ - $popupHelper = app(PopupReportInterface::class); - $budget = $budgetRepository->findNull((int)$attributes['budgetId']); - $account = $accountRepository->findNull((int)$attributes['accountId']); - - - switch (true) { - case BalanceLine::ROLE_DEFAULTROLE === $role && null !== $budget && null !== $account: - // normal row with a budget: - $journals = $popupHelper->balanceForBudget($budget, $account, $attributes); - break; - case BalanceLine::ROLE_DEFAULTROLE === $role && null === $budget && null !== $account: - // normal row without a budget: - $budget = new Budget; - $journals = $popupHelper->balanceForNoBudget($account, $attributes); - $budget->name = (string)trans('firefly.no_budget'); - break; - case BalanceLine::ROLE_TAGROLE === $role: - // row with tag info. - return 'Firefly cannot handle this type of info-button (BalanceLine::TagRole)'; - } - // @codeCoverageIgnoreStart - try { - $view = view('popup.report.balance-amount', compact('journals', 'budget', 'account'))->render(); - } catch (Throwable $e) { - Log::error(sprintf('Could not render: %s', $e->getMessage())); - $view = 'Firefly III could not render the view. Please see the log files.'; - } - // @codeCoverageIgnoreEnd - - return $view; - } /** * Get options for budget report. diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index cc627a797e..8ec753a2b6 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -1029,7 +1029,7 @@ return [ 'fiscal_year' => 'Fiscal year', 'income_entry' => 'Income from account ":name" between :start and :end', 'expense_entry' => 'Expenses to account ":name" between :start and :end', - 'category_entry' => 'Expenses in category ":name" between :start and :end', + 'category_entry' => 'Expenses and income in category ":name" between :start and :end', 'budget_spent_amount' => 'Expenses in budget ":budget" between :start and :end', 'balance_amount' => 'Expenses in budget ":budget" paid from account ":account" between :start and :end', 'no_audit_activity' => 'No activity was recorded on account :account_name between :start and :end.', diff --git a/resources/views/v1/popup/list/journals.twig b/resources/views/v1/popup/list/journals.twig index 42f2a0ea59..14dbcb9d0a 100644 --- a/resources/views/v1/popup/list/journals.twig +++ b/resources/views/v1/popup/list/journals.twig @@ -25,9 +25,12 @@ {# Make sum: #} {% set sum = 0 %} + {% set symbol = '' %} + {% set decimal_places =2 %} {% for transaction in journals %} {# add to sum #} - + {% set symbol = transaction.currency_symbol %} + {% set decimal_places = transaction.currency_decimal_places %} {% if transaction.transaction_type_type == 'Withdrawal' %} @@ -134,8 +137,9 @@ {{ 'sum'|_ }}: - {# TODO avoid using formatAmount #} - {{ sum|formatAmount }} + {% if sum != 0 %} + {{ formatAmountBySymbol(sum, symbol, decimal_places) }} + {% endif %} diff --git a/resources/views/v1/popup/report/budget-spent-amount.twig b/resources/views/v1/popup/report/budget-spent-amount.twig index 79b3fc8156..fa88bae9ae 100644 --- a/resources/views/v1/popup/report/budget-spent-amount.twig +++ b/resources/views/v1/popup/report/budget-spent-amount.twig @@ -9,11 +9,6 @@
\ No newline at end of file + diff --git a/resources/views/v1/list/journals-array-tiny.twig b/resources/views/v1/list/journals-array-tiny.twig index f3fa763136..d01495d8cd 100644 --- a/resources/views/v1/list/journals-array-tiny.twig +++ b/resources/views/v1/list/journals-array-tiny.twig @@ -7,4 +7,4 @@ {% endfor %} - \ No newline at end of file + diff --git a/resources/views/v1/partials/journal-row.twig b/resources/views/v1/partials/journal-row.twig index 6a041ad85b..9bd55d9c60 100644 --- a/resources/views/v1/partials/journal-row.twig +++ b/resources/views/v1/partials/journal-row.twig @@ -1 +1 @@ -

REPLACE ME

\ No newline at end of file +

REPLACE ME

diff --git a/resources/views/v1/partials/transaction-row.twig b/resources/views/v1/partials/transaction-row.twig index 6a041ad85b..9bd55d9c60 100644 --- a/resources/views/v1/partials/transaction-row.twig +++ b/resources/views/v1/partials/transaction-row.twig @@ -1 +1 @@ -

REPLACE ME

\ No newline at end of file +

REPLACE ME

diff --git a/resources/views/v1/search/search.twig b/resources/views/v1/search/search.twig index 5398c90e8d..5234c64dce 100644 --- a/resources/views/v1/search/search.twig +++ b/resources/views/v1/search/search.twig @@ -3,4 +3,4 @@ {{ trans('firefly.search_found_transactions', {count: transactions.count, time: searchTime}) }}

-{% include 'list.groups' %} \ No newline at end of file +{% include 'list.groups' %} diff --git a/resources/views/v1/transactions/links/modal.twig b/resources/views/v1/transactions/links/modal.twig index 3fc07d9ef2..ecd38eaf0f 100644 --- a/resources/views/v1/transactions/links/modal.twig +++ b/resources/views/v1/transactions/links/modal.twig @@ -49,4 +49,4 @@ - \ No newline at end of file + diff --git a/tests/Api/V1/Controllers/Chart/AccountControllerTest.php b/tests/Api/V1/Controllers/Chart/AccountControllerTest.php index 6af09b1a1a..993c99d907 100644 --- a/tests/Api/V1/Controllers/Chart/AccountControllerTest.php +++ b/tests/Api/V1/Controllers/Chart/AccountControllerTest.php @@ -1,4 +1,5 @@ assertStatus(200); } -} \ No newline at end of file +} diff --git a/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php b/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php index e1fd5a08ce..07418b3bb0 100644 --- a/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php +++ b/tests/Api/V1/Controllers/Chart/CategoryControllerTest.php @@ -1,4 +1,5 @@ assertStatus(200); } -} \ No newline at end of file +} diff --git a/tests/Api/V1/Controllers/SummaryControllerTest.php b/tests/Api/V1/Controllers/SummaryControllerTest.php index 0131ab5b3d..4d59076eab 100644 --- a/tests/Api/V1/Controllers/SummaryControllerTest.php +++ b/tests/Api/V1/Controllers/SummaryControllerTest.php @@ -1,4 +1,5 @@ assertStatus(200); // TODO AFTER 4.8,0: check if JSON is correct } -} \ No newline at end of file +} diff --git a/tests/Feature/Controllers/Category/CreateControllerTest.php b/tests/Feature/Controllers/Category/CreateControllerTest.php index 7051defe17..10663f0fb4 100644 --- a/tests/Feature/Controllers/Category/CreateControllerTest.php +++ b/tests/Feature/Controllers/Category/CreateControllerTest.php @@ -1,4 +1,5 @@ assertStatus(302); $response->assertSessionHas('success'); } -} \ No newline at end of file +} diff --git a/tests/Feature/Controllers/Category/DeleteControllerTest.php b/tests/Feature/Controllers/Category/DeleteControllerTest.php index adc370c5a3..39b4b735ee 100644 --- a/tests/Feature/Controllers/Category/DeleteControllerTest.php +++ b/tests/Feature/Controllers/Category/DeleteControllerTest.php @@ -1,4 +1,5 @@ assertStatus(302); $response->assertSessionHas('success'); } -} \ No newline at end of file +} diff --git a/tests/Feature/Controllers/Category/EditControllerTest.php b/tests/Feature/Controllers/Category/EditControllerTest.php index f012cf925e..5504b640ee 100644 --- a/tests/Feature/Controllers/Category/EditControllerTest.php +++ b/tests/Feature/Controllers/Category/EditControllerTest.php @@ -1,4 +1,5 @@ assertStatus(302); $response->assertSessionHas('success'); } -} \ No newline at end of file +} diff --git a/tests/Feature/Controllers/Category/IndexControllerTest.php b/tests/Feature/Controllers/Category/IndexControllerTest.php index f6f0f03875..788022bae3 100644 --- a/tests/Feature/Controllers/Category/IndexControllerTest.php +++ b/tests/Feature/Controllers/Category/IndexControllerTest.php @@ -1,4 +1,5 @@ assertSee('