Various code cleanup.

This commit is contained in:
James Cole
2018-08-04 17:30:06 +02:00
parent 5af026674f
commit f0d3ca5d53
88 changed files with 552 additions and 311 deletions

View File

@@ -103,9 +103,7 @@ class General extends Twig_Extension
return new Twig_SimpleFunction(
'activeRoutePartialWhat',
function ($context): string {
$args = \func_get_args();
$route = $args[1]; // name of the route.
$what = $args[2]; // name of the route.
[, $route, $what] = \func_get_args();
$activeWhat = $context['what'] ?? false;
if ($what === $activeWhat && !(false === stripos(Route::getCurrentRoute()->getName(), $route))) {