Various code cleanup.

This commit is contained in:
James Cole
2021-04-07 07:28:43 +02:00
parent 4ddcb0c965
commit f12744ad8c
180 changed files with 714 additions and 721 deletions

View File

@@ -54,12 +54,12 @@ class BudgetList implements BinderInterface
$list = array_unique(array_map('\intval', explode(',', $value)));
// @codeCoverageIgnoreStart
if (0 === count($list)) {
Log::warning('Budget list count is zero, return 404.');
throw new NotFoundHttpException;
}
// @codeCoverageIgnoreEnd
/** @var Collection $collection */
$collection = auth()->user()->budgets()

View File

@@ -51,7 +51,7 @@ class CategoryList implements BinderInterface
$list = array_unique(array_map('\intval', explode(',', $value)));
if (0 === count($list)) {
throw new NotFoundHttpException; // @codeCoverageIgnore
throw new NotFoundHttpException;
}
/** @var \Illuminate\Support\Collection $collection */

View File

@@ -69,7 +69,7 @@ class JournalList implements BinderInterface
{
$list = array_unique(array_map('\intval', explode(',', $value)));
if (0 === count($list)) {
throw new NotFoundHttpException; // @codeCoverageIgnore
throw new NotFoundHttpException;
}
return $list;

View File

@@ -52,12 +52,12 @@ class TagList implements BinderInterface
}
$list = array_unique(array_map('\strtolower', explode(',', $value)));
Log::debug('List of tags is', $list);
// @codeCoverageIgnoreStart
if (0 === count($list)) {
Log::error('Tag list is empty.');
throw new NotFoundHttpException;
}
// @codeCoverageIgnoreEnd
/** @var TagRepositoryInterface $repository */
$repository = app(TagRepositoryInterface::class);