Skip to content

Commit

Permalink
Enable formatting of phpt files in tidy.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Feb 3, 2020
1 parent 9942f45 commit d2cb200
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/dev/tidy.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@
$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) {
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit d2cb200

Please sign in to comment.