1
0
mirror of synced 2025-02-20 22:23:14 +03:00

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
This commit is contained in:
Cas 2013-09-28 17:47:35 +02:00
parent 008187982d
commit 1fda797c8f

View File

@ -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('<spaces>', $this->spaces, $code);
}
@ -413,7 +413,7 @@ public function __construct()
$body = str_replace('<spaces>', $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";
}
/**