Skip to content

Commit

Permalink
Partial Revert "feat: StatementIndentationFixer - support comment for…
Browse files Browse the repository at this point in the history
… continuous control statement (PHP-CS-Fixer#7384)"
  • Loading branch information
keradus committed Dec 26, 2023
1 parent c0c69e5 commit 802f1d3
Showing 1 changed file with 8 additions and 31 deletions.
39 changes: 8 additions & 31 deletions tests/Fixer/Basic/BracesFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ public static function provideFixMissingBracesAndIndentCases(): iterable
$a = "a";
} elseif (3) {
$b = "b";
// comment
// comment
} else {
$c = "c";
}
Expand Down Expand Up @@ -1898,7 +1898,7 @@ public function __construct(
$a = "a";
} elseif (3) {
$b = "b";
// comment
// comment
} else {
$c = "c";
}
Expand All @@ -1908,40 +1908,17 @@ public function __construct(
self::CONFIGURATION_OOP_POSITION_SAME_LINE,
];

yield 'multiline comment in block' => [
'<?php
if (1) {
$b = "a";
// multiline comment line 1
// multiline comment line 2
} elseif (2) {
// empty
} else {
$c = "b";
}',
'<?php
if (1) {
$b = "a";
// multiline comment line 1
// multiline comment line 2
} elseif (2) {
// empty
} else {
$c = "b";
}',
];

yield [
'<?php
if (1) {
if (2) {
$a = "a";
} elseif (3) {
$b = "b";
// comment line 1
// comment line 2
// comment line 3
// comment line 4
// comment line 1
// comment line 2
// comment line 3
// comment line 4
} else {
$c = "c";
}
Expand Down Expand Up @@ -3245,10 +3222,10 @@ public static function provideFixCommentBeforeBraceCases(): iterable
// 2.5+ API
if (isNewApi()) {
echo "new API";
// 2.4- API
// 2.4- API
} elseif (isOldApi()) {
echo "old API";
// other API
// 2.4- API
} else {
echo "unknown API";
// sth
Expand Down

0 comments on commit 802f1d3

Please sign in to comment.