Last code optimization before release.

This commit is contained in:
James Cole
2018-07-28 10:45:16 +02:00
parent d35470a79e
commit 0c7b652a70
42 changed files with 217 additions and 301 deletions

View File

@@ -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);
}