mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Code cleanup
This commit is contained in:
@@ -50,7 +50,7 @@ class AccountList implements BinderInterface
|
||||
$list[] = (int)$entry;
|
||||
}
|
||||
$list = array_unique($list);
|
||||
if (count($list) === 0) {
|
||||
if (\count($list) === 0) {
|
||||
Log::error('Account list is empty.');
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ class BudgetList implements BinderInterface
|
||||
$list[] = (int)$entry;
|
||||
}
|
||||
$list = array_unique($list);
|
||||
if (count($list) === 0) {
|
||||
if (\count($list) === 0) {
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class BudgetList implements BinderInterface
|
||||
->get();
|
||||
|
||||
// add empty budget if applicable.
|
||||
if (in_array(0, $list)) {
|
||||
if (\in_array(0, $list)) {
|
||||
$collection->push(new Budget);
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,7 @@ class CategoryList implements BinderInterface
|
||||
$list[] = (int)$entry;
|
||||
}
|
||||
$list = array_unique($list);
|
||||
if (count($list) === 0) {
|
||||
if (\count($list) === 0) {
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class CategoryList implements BinderInterface
|
||||
->get();
|
||||
|
||||
// add empty category if applicable.
|
||||
if (in_array(0, $list)) {
|
||||
if (\in_array(0, $list)) {
|
||||
$collection->push(new Category);
|
||||
}
|
||||
|
||||
|
@@ -47,7 +47,7 @@ class JournalList implements BinderInterface
|
||||
$list[] = (int)$entry;
|
||||
}
|
||||
$list = array_unique($list);
|
||||
if (count($list) === 0) {
|
||||
if (\count($list) === 0) {
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ class TagList implements BinderInterface
|
||||
$list[] = strtolower(trim($entry));
|
||||
}
|
||||
$list = array_unique($list);
|
||||
if (count($list) === 0) {
|
||||
if (\count($list) === 0) {
|
||||
Log::error('Tag list is empty.');
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class TagList implements BinderInterface
|
||||
|
||||
$collection = $allTags->filter(
|
||||
function (Tag $tag) use ($list) {
|
||||
return in_array(strtolower($tag->tag), $list);
|
||||
return \in_array(strtolower($tag->tag), $list);
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user