summaryrefslogtreecommitdiffstats
path: root/src/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils')
-rw-r--r--src/Utils/Formatter.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php
index e07394c..c111bc7 100644
--- a/src/Utils/Formatter.php
+++ b/src/Utils/Formatter.php
@@ -378,7 +378,7 @@ class Formatter
if ($tmp = static::isClause($curr)) {
if ($tmp == 2 || $this->options['clause_newline']) {
$lineEnded = true;
- if ($this->options['parts_newline']) {
+ if ($this->options['parts_newline'] && $indent > 0) {
--$indent;
}
}
@@ -442,11 +442,6 @@ class Formatter
// Finishing the line.
if ($lineEnded) {
- if ($indent < 0) {
- // TODO: Make sure this never occurs and delete it.
- $indent = 0;
- }
-
$ret .= $this->options['line_ending']
. str_repeat($this->options['indentation'], $indent);