mirror of
https://github.com/symfony/error-handler.git
synced 2026-03-24 00:02:09 +01:00
PHP CS Fixer: enable @PHP8x1Migration:risky
This commit is contained in:
committed by
Nicolas Grekas
parent
33c64713db
commit
4bbc6c920b
@@ -258,9 +258,7 @@ class HtmlErrorRenderer implements ErrorRendererInterface
|
||||
// remove main pre/code tags
|
||||
$code = preg_replace('#^<pre.*?>\s*<code.*?>(.*)</code>\s*</pre>#s', '\\1', $code);
|
||||
// split multiline span tags
|
||||
$code = preg_replace_callback('#<span ([^>]++)>((?:[^<\\n]*+\\n)++[^<]*+)</span>#', static function ($m) {
|
||||
return "<span $m[1]>".str_replace("\n", "</span>\n<span $m[1]>", $m[2]).'</span>';
|
||||
}, $code);
|
||||
$code = preg_replace_callback('#<span ([^>]++)>((?:[^<\\n]*+\\n)++[^<]*+)</span>#', static fn ($m) => "<span $m[1]>".str_replace("\n", "</span>\n<span $m[1]>", $m[2]).'</span>', $code);
|
||||
$content = explode("\n", $code);
|
||||
|
||||
$lines = [];
|
||||
|
||||
@@ -90,9 +90,7 @@ class FileLinkFormatterTest extends TestCase
|
||||
#[DataProvider('providePathMappings')]
|
||||
public function testIdeFileLinkFormatWithPathMappingParameters($mappings)
|
||||
{
|
||||
$params = array_reduce($mappings, static function ($c, $m) {
|
||||
return "$c&".implode('>', $m);
|
||||
}, '');
|
||||
$params = array_reduce($mappings, static fn ($c, $m) => "$c&".implode('>', $m), '');
|
||||
$sut = new FileLinkFormatter("vscode://file/%f:%l$params");
|
||||
foreach ($mappings as $mapping) {
|
||||
$fileGuest = $mapping['guest'].'file.php';
|
||||
|
||||
Reference in New Issue
Block a user