mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-10 08:53:57 +09:00
Updates to vendors etc
This commit is contained in:
@@ -25,15 +25,16 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
class FileLinkFormatter
|
||||
{
|
||||
private array|false $fileLinkFormat;
|
||||
private ?RequestStack $requestStack = null;
|
||||
private ?string $baseDir = null;
|
||||
private \Closure|string|null $urlFormat;
|
||||
|
||||
/**
|
||||
* @param string|\Closure $urlFormat the URL format, or a closure that returns it on-demand
|
||||
* @param string|\Closure $urlFormat The URL format, or a closure that returns it on-demand
|
||||
*/
|
||||
public function __construct(string|array|null $fileLinkFormat = null, ?RequestStack $requestStack = null, ?string $baseDir = null, string|\Closure|null $urlFormat = null)
|
||||
{
|
||||
public function __construct(
|
||||
string|array|null $fileLinkFormat = null,
|
||||
private ?RequestStack $requestStack = null,
|
||||
private ?string $baseDir = null,
|
||||
private string|\Closure|null $urlFormat = null,
|
||||
) {
|
||||
$fileLinkFormat ??= $_ENV['SYMFONY_IDE'] ?? $_SERVER['SYMFONY_IDE'] ?? '';
|
||||
|
||||
if (!\is_array($f = $fileLinkFormat)) {
|
||||
@@ -43,15 +44,9 @@ class FileLinkFormatter
|
||||
}
|
||||
|
||||
$this->fileLinkFormat = $fileLinkFormat;
|
||||
$this->requestStack = $requestStack;
|
||||
$this->baseDir = $baseDir;
|
||||
$this->urlFormat = $urlFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|false
|
||||
*/
|
||||
public function format(string $file, int $line): string|bool
|
||||
public function format(string $file, int $line): string|false
|
||||
{
|
||||
if ($fmt = $this->getFileLinkFormat()) {
|
||||
for ($i = 1; isset($fmt[$i]); ++$i) {
|
||||
@@ -109,7 +104,3 @@ class FileLinkFormatter
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!class_exists(\Symfony\Component\HttpKernel\Debug\FileLinkFormatter::class, false)) {
|
||||
class_alias(FileLinkFormatter::class, \Symfony\Component\HttpKernel\Debug\FileLinkFormatter::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user