From 1fda797c8f69915a34257e19ae3095ea7adca450 Mon Sep 17 00:00:00 2001 From: Cas Date: Sat, 28 Sep 2013 17:47:35 +0200 Subject: [PATCH] Appended newline to (newly) generated files for PSR2 compatibility Appended newline to (newly) generated files for PSR2 compatibility Additionally, slightly improved styling of concatenating return value --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index c497f5761..8e93a2817 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -392,7 +392,7 @@ public function __construct() $this->generateEntityBody($metadata) ); - $code = str_replace($placeHolders, $replacements, static::$classTemplate); + $code = str_replace($placeHolders, $replacements, static::$classTemplate) . "\n"; return str_replace('', $this->spaces, $code); } @@ -413,7 +413,7 @@ public function __construct() $body = str_replace('', $this->spaces, $body); $last = strrpos($currentCode, '}'); - return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : ''). "}\n"; + return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : '') . "}\n"; } /**