diff --git a/lib/Doctrine/ODM/CouchDB/Proxy/ProxyFactory.php b/lib/Doctrine/ODM/CouchDB/Proxy/ProxyFactory.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/ODM/CouchDB/Proxy/ProxyFactory.php
+++ b/lib/Doctrine/ODM/CouchDB/Proxy/ProxyFactory.php
@@ -247,8 +247,8 @@ class ProxyFactory
     }
 
     /** Proxy class code template */
-    private static $proxyClassTemplate =
-'<?php
+    private static $proxyClassTemplate = <<<'PHP'
+<?php
 
 namespace <namespace>;
 
@@ -282,6 +282,7 @@ class <proxyClassName> extends \<className> implements \Doctrine\ODM\CouchDB\Pro
     {
         <sleepImpl>
     }
-}';
+}
+PHP;
 }
using NOWDOC syntax is cleaner when defining large chunks of PHP code