mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Last code optimization before release.
This commit is contained in:
@@ -41,16 +41,14 @@ class SimpleJournalList implements BinderInterface
|
||||
*
|
||||
* @return mixed
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @SuppressWarnings(PHPMD.NPathComplexity)
|
||||
*/
|
||||
public static function routeBinder(string $value, Route $route): Collection
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$list = [];
|
||||
$incoming = explode(',', $value);
|
||||
foreach ($incoming as $entry) {
|
||||
$list[] = (int)$entry;
|
||||
}
|
||||
$list = array_unique($list);
|
||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||
if (0 === \count($list)) {
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
}
|
||||
@@ -97,7 +95,6 @@ class SimpleJournalList implements BinderInterface
|
||||
}
|
||||
|
||||
if ($final->count() > 0) {
|
||||
|
||||
if (\count($messages) > 0) {
|
||||
session()->flash('info', $messages);
|
||||
}
|
||||
|
Reference in New Issue
Block a user