mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Various code cleanup.
This commit is contained in:
@@ -132,6 +132,7 @@ class AmountFormat extends Twig_Extension
|
||||
{
|
||||
return new Twig_SimpleFunction(
|
||||
'formatAmountBySymbol',
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
function (string $amount, string $symbol, int $decimalPlaces = null, bool $coloured = null): string {
|
||||
$decimalPlaces = $decimalPlaces ?? 2;
|
||||
$coloured = $coloured ?? true;
|
||||
|
||||
@@ -136,7 +136,7 @@ class TransactionJournal extends Twig_Extension
|
||||
/**
|
||||
* @param JournalModel $journal
|
||||
*
|
||||
* @return string
|
||||
* @return array
|
||||
*/
|
||||
private function getTotalAmount(JournalModel $journal): array
|
||||
{
|
||||
|
||||
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user