1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

apply pretty formatting when there are no issues (#1946)

This commit is contained in:
SignpostMarv 2019-07-13 18:44:15 +01:00 committed by Matthew Brown
parent ee1387473f
commit 96429ff94f

View File

@ -285,7 +285,7 @@ class ErrorBaseline
$baselineDoc->formatOutput = true;
$xml = preg_replace_callback(
'/<files (psalm-version="[^"]+") (?:php-version="(.+)">\n)/',
'/<files (psalm-version="[^"]+") (?:php-version="(.+)"(\/?>)\n)/',
/**
* @param array<int, string> $matches
*/
@ -301,7 +301,7 @@ class ErrorBaseline
"\n" .
' "' .
"\n" .
'>' .
$matches[3] .
"\n";
},
$baselineDoc->saveXML()