From 0f92944edd77dd83555a9116b414ec8f1a77ac9d Mon Sep 17 00:00:00 2001 From: Nick Masters Date: Tue, 30 Oct 2012 22:22:04 +0000 Subject: [PATCH] Do not add trailing whitespace to blank lines --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 550cc5a3a..a2b8b41b5 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -1207,7 +1207,9 @@ public function __construct() $lines = explode("\n", $code); foreach ($lines as $key => $value) { - $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; + if (!empty($value)) { + $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; + } } return implode("\n", $lines);