@@ -33,7 +33,7 @@ class CodeExtension extends AbstractExtension
33
33
public function __construct ($ fileLinkFormat , $ rootDir , $ charset )
34
34
{
35
35
$ this ->fileLinkFormat = $ fileLinkFormat ?: ini_get ('xdebug.file_link_format ' ) ?: get_cfg_var ('xdebug.file_link_format ' );
36
- $ this ->rootDir = str_replace ('/ ' , DIRECTORY_SEPARATOR , \dirname ($ rootDir )).DIRECTORY_SEPARATOR ;
36
+ $ this ->rootDir = str_replace ('/ ' , \ DIRECTORY_SEPARATOR , \dirname ($ rootDir )).\ DIRECTORY_SEPARATOR ;
37
37
$ this ->charset = $ charset ;
38
38
}
39
39
@@ -164,11 +164,11 @@ public function formatFile($file, $line, $text = null)
164
164
$ file = trim ($ file );
165
165
166
166
if (null === $ text ) {
167
- $ text = str_replace ('/ ' , DIRECTORY_SEPARATOR , $ file );
167
+ $ text = str_replace ('/ ' , \ DIRECTORY_SEPARATOR , $ file );
168
168
if (0 === strpos ($ text , $ this ->rootDir )) {
169
169
$ text = substr ($ text , \strlen ($ this ->rootDir ));
170
- $ text = explode (DIRECTORY_SEPARATOR , $ text , 2 );
171
- $ text = sprintf ('<abbr title="%s%2$s">%s</abbr>%s ' , $ this ->rootDir , $ text [0 ], isset ($ text [1 ]) ? DIRECTORY_SEPARATOR .$ text [1 ] : '' );
170
+ $ text = explode (\ DIRECTORY_SEPARATOR , $ text , 2 );
171
+ $ text = sprintf ('<abbr title="%s%2$s">%s</abbr>%s ' , $ this ->rootDir , $ text [0 ], isset ($ text [1 ]) ? \ DIRECTORY_SEPARATOR .$ text [1 ] : '' );
172
172
}
173
173
}
174
174
0 commit comments