mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
PHPStorm can order methods by alphabet, who knew.
This commit is contained in:
@@ -29,6 +29,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\Support\Search\OperatorQuerySearch;
|
||||
use League\CommonMark\GithubFlavoredMarkdownConverter;
|
||||
use Route;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFilter;
|
||||
use Twig\TwigFunction;
|
||||
@@ -49,22 +50,6 @@ class General extends AbstractExtension
|
||||
];
|
||||
}
|
||||
|
||||
public function getFunctions(): array
|
||||
{
|
||||
return [
|
||||
$this->phpdate(),
|
||||
$this->activeRouteStrict(),
|
||||
$this->activeRoutePartial(),
|
||||
$this->activeRoutePartialObjectType(),
|
||||
$this->menuOpenRoutePartial(),
|
||||
$this->formatDate(),
|
||||
$this->getMetaField(),
|
||||
$this->hasRole(),
|
||||
$this->getRootSearchOperator(),
|
||||
$this->carbonize(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Show account balance. Only used on the front page of Firefly III.
|
||||
*/
|
||||
@@ -206,7 +191,7 @@ class General extends AbstractExtension
|
||||
]
|
||||
);
|
||||
|
||||
return (string) $converter->convert($text);
|
||||
return (string)$converter->convert($text);
|
||||
},
|
||||
['is_safe' => ['html']]
|
||||
);
|
||||
@@ -220,14 +205,30 @@ class General extends AbstractExtension
|
||||
return new TwigFilter(
|
||||
'phphost',
|
||||
static function (string $string): string {
|
||||
$proto = (string) parse_url($string, PHP_URL_SCHEME);
|
||||
$host = (string) parse_url($string, PHP_URL_HOST);
|
||||
$proto = (string)parse_url($string, PHP_URL_SCHEME);
|
||||
$host = (string)parse_url($string, PHP_URL_HOST);
|
||||
|
||||
return e(sprintf('%s://%s', $proto, $host));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function getFunctions(): array
|
||||
{
|
||||
return [
|
||||
$this->phpdate(),
|
||||
$this->activeRouteStrict(),
|
||||
$this->activeRoutePartial(),
|
||||
$this->activeRoutePartialObjectType(),
|
||||
$this->menuOpenRoutePartial(),
|
||||
$this->formatDate(),
|
||||
$this->getMetaField(),
|
||||
$this->hasRole(),
|
||||
$this->getRootSearchOperator(),
|
||||
$this->carbonize(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic example thing for some views.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user