diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-08-29 17:37:28 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-08-29 17:46:59 +0100 |
| commit | 845c3ce6c174371aefb72f523a824e20d48b0876 (patch) | |
| tree | 1cfee7c543b9b2fa43aab0387bbbd42fce01bb75 /app/Filter.php | |
| parent | e9fd18363a906a73ba946d65139e8b01c0674c1b (diff) | |
| download | webtrees-845c3ce6c174371aefb72f523a824e20d48b0876.tar.gz webtrees-845c3ce6c174371aefb72f523a824e20d48b0876.tar.bz2 webtrees-845c3ce6c174371aefb72f523a824e20d48b0876.zip | |
Type hints
Diffstat (limited to 'app/Filter.php')
| -rw-r--r-- | app/Filter.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Filter.php b/app/Filter.php index c43a7450d8..a81f723e47 100644 --- a/app/Filter.php +++ b/app/Filter.php @@ -49,7 +49,7 @@ class Filter * * @return string */ - public static function formatText($text, Tree $tree) + public static function formatText(string $text, Tree $tree): string { switch ($tree->getPreference('FORMAT_TEXT')) { case 'markdown': @@ -63,11 +63,11 @@ class Filter * Format a block of text, expanding URLs and XREFs. * * @param string $text - * @param Tree tree + * @param Tree $tree * * @return string */ - public static function expandUrls($text, Tree $tree) + public static function expandUrls(string $text, Tree $tree): string { // If it looks like a URL, turn it into a markdown autolink. $text = preg_replace('/' . addcslashes(self::URL_REGEX, '/') . '/', '<$0>', $text); @@ -112,7 +112,7 @@ class Filter * * @return string */ - public static function markdown($text, Tree $tree) + public static function markdown(string $text, Tree $tree): string { $environment = Environment::createCommonMarkEnvironment(); $environment->mergeConfig(['html_input' => 'escape']); |
