10000 [ErrorHandler] Make $fileLinkFormat type FileLinkFormatter only · symfony/symfony@32346bf · GitHub
[go: up one dir, main page]

Skip to content

Commit 32346bf

Browse files
committed
[ErrorHandler] Make $fileLinkFormat type FileLinkFormatter only
1 parent 47e3e57 commit 32346bf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Symfony/Component/ErrorHandler/ErrorRenderer/HtmlErrorRenderer.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class HtmlErrorRenderer implements ErrorRendererInterface
3737

3838
private bool|\Closure $debug;
3939
private string $charset;
40-
private string|array|FileLinkFormatter|false $fileLinkFormat;
40+
private FileLinkFormatter $fileLinkFormat;
4141
private ?string $projectDir;
4242
private string|\Closure $outputBuffer;
4343
private ?LoggerInterface $logger;
@@ -209,11 +209,7 @@ private function getFileRelative(string $file): ?string
209209

210210
private function getFileLink(string $file, int $line): string|false
211211
{
212-
if ($fmt = $this->fileLinkFormat) {
213-
return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line);
214-
}
215-
216-
return false;
212+
return $this->fileLinkFormat->format($file, $line);
217213
}
218214

219215
/**

0 commit comments

Comments
 (0)
0