Various code cleanup.

This commit is contained in:
James Cole
2017-01-21 09:07:10 +01:00
parent 71f6ba3418
commit 738a311f49
9 changed files with 65 additions and 46 deletions

View File

@@ -14,7 +14,6 @@ declare(strict_types = 1);
namespace FireflyIII\Support\Twig;
use Carbon\Carbon;
use Config;
use FireflyIII\Models\Account;
use FireflyIII\Models\TransactionJournal;
use Route;
@@ -42,7 +41,6 @@ class General extends Twig_Extension
$this->formatAmountPlain(),
$this->formatJournal(),
$this->balance(),
$this->getAccountRole(),
$this->formatFilesize(),
$this->mimeIcon(),
];
@@ -234,18 +232,6 @@ class General extends Twig_Extension
);
}
/**
* @return Twig_SimpleFilter
*/
protected function getAccountRole(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
'getAccountRole', function (string $name): string {
return Config::get('firefly.accountRoles.' . $name);
}
);
}
/**
* @return Twig_SimpleFunction
*/