From d2cb200e10ada6fa44c54a29292bb4665728fff0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 3 Feb 2020 13:46:42 +0100 Subject: Enable formatting of phpt files in tidy.php --- scripts/dev/tidy.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/dev/tidy.php b/scripts/dev/tidy.php index 107f0c3a8f..cf153ead55 100644 --- a/scripts/dev/tidy.php +++ b/scripts/dev/tidy.php @@ -65,12 +65,11 @@ foreach ($it as $file) { $code = stripTrailingWhitespace($code); $code = reindentToSpaces($code); } else if ($lang === 'phpt') { - // TODO: Don't reformat .phpt on PHP-7.4. - /*$code = transformTestCode($code, function(string $code) { + $code = transformTestCode($code, function(string $code) { $code = stripTrailingWhitespace($code); $code = reindentToSpaces($code); return $code; - });*/ + }); } if ($origCode !== $code) { @@ -137,8 +136,7 @@ function getLanguageFromExtension(string $ext): ?string { case 're': return 'c'; case 'php': - // TODO: Reformat .inc files. - //case 'inc': + case 'inc': return 'php'; case 'phpt': return 'phpt'; -- cgit v1.2.1