Skip to content

Commit

Permalink
fixed issue when indent is not 4 (#5479)
Browse files Browse the repository at this point in the history
* fixed issue when indent is not 4

* removed unnecessary comment
  • Loading branch information
jagermesh committed Jan 19, 2024
1 parent 7e2495e commit 55e7c91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PhpParser/Printer/BetterStandardPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ protected function indent(): void
protected function outdent(): void
{
if ($this->getIndentCharacter() === ' ') {
// - 4 spaces
assert($this->indentLevel >= 4);
$this->indentLevel -= 4;
$indentSize = SimpleParameterProvider::provideIntParameter(Option::INDENT_SIZE);
assert($this->indentLevel >= $indentSize);
$this->indentLevel -= $indentSize;
} else {
// - 1 tab
assert($this->indentLevel >= 1);
Expand Down

0 comments on commit 55e7c91

Please sign in to comment.