diff options
Diffstat (limited to 'vendor/symfony/http-kernel/Debug/FileLinkFormatter.php')
| -rw-r--r-- | vendor/symfony/http-kernel/Debug/FileLinkFormatter.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php index 221d33473e..9476d50486 100644 --- a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php +++ b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php @@ -36,7 +36,7 @@ class FileLinkFormatter implements \Serializable $fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); if ($fileLinkFormat && !\is_array($fileLinkFormat)) { $i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fileLinkFormat = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); + $fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); } $this->fileLinkFormat = $fileLinkFormat; @@ -55,20 +55,26 @@ class FileLinkFormatter implements \Serializable } } - return strtr($fmt[0], array('%f' => $file, '%l' => $line)); + return strtr($fmt[0], ['%f' => $file, '%l' => $line]); } return false; } + /** + * @internal + */ public function serialize() { return serialize($this->getFileLinkFormat()); } + /** + * @internal + */ public function unserialize($serialized) { - $this->fileLinkFormat = unserialize($serialized, array('allowed_classes' => false)); + $this->fileLinkFormat = unserialize($serialized, ['allowed_classes' => false]); } /** @@ -95,10 +101,10 @@ class FileLinkFormatter implements \Serializable return; } - return array( + return [ $request->getSchemeAndHttpHost().$request->getBasePath().$this->urlFormat, $this->baseDir.\DIRECTORY_SEPARATOR, '', - ); + ]; } } } |
