PHP CS Fixer: enable @PHP8x1Migration:risky

This commit is contained in:
Dariusz Ruminski
2026-01-26 16:17:45 +01:00
committed by Nicolas Grekas
parent 33c64713db
commit 4bbc6c920b
2 changed files with 2 additions and 6 deletions

View File

@@ -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 = [];

View File

@@ -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';