mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Fix various phpstan issues.
This commit is contained in:
@@ -54,7 +54,7 @@ class BudgetList implements BinderInterface
|
||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||
|
||||
|
||||
if (0 === count($list)) {
|
||||
if (0 === count($list)) { // @phpstan-ignore-line
|
||||
app('log')->warning('Budget list count is zero, return 404.');
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ class CategoryList implements BinderInterface
|
||||
}
|
||||
|
||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||
if (0 === count($list)) {
|
||||
if (0 === count($list)) { // @phpstan-ignore-line
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
|
@@ -71,7 +71,7 @@ class Date implements BinderInterface
|
||||
|
||||
try {
|
||||
$result = new Carbon($value);
|
||||
} catch (InvalidDateException $e) {
|
||||
} catch (InvalidDateException $e) { // @phpstan-ignore-line
|
||||
$message = sprintf('Could not parse date "%s" for user #%d: %s', $value, auth()->user()->id, $e->getMessage());
|
||||
app('log')->error($message);
|
||||
throw new NotFoundHttpException($message, $e);
|
||||
|
@@ -70,7 +70,7 @@ class JournalList implements BinderInterface
|
||||
protected static function parseList(string $value): array
|
||||
{
|
||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||
if (0 === count($list)) {
|
||||
if (0 === count($list)) { // @phpstan-ignore-line
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ class TagList implements BinderInterface
|
||||
$list = array_unique(array_map('\strtolower', explode(',', $value)));
|
||||
app('log')->debug('List of tags is', $list);
|
||||
|
||||
if (0 === count($list)) {
|
||||
if (0 === count($list)) { // @phpstan-ignore-line
|
||||
app('log')->error('Tag list is empty.');
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
Reference in New Issue
Block a user