From 74fc18238a69ddba70d491d36578533acb91b223 Mon Sep 17 00:00:00 2001 From: 4alexandr <4alexandr.n@gmail.com> Date: Fri, 23 Jan 2015 17:47:29 +0200 Subject: [PATCH] Made PATTERN_MATCH_ID_METHOD more flexible PATTERN_MATCH_ID_METHOD match any valid function declaration, example: function getId(){return$this->id;} --- lib/Doctrine/Common/Proxy/ProxyGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Common/Proxy/ProxyGenerator.php b/lib/Doctrine/Common/Proxy/ProxyGenerator.php index e51600844..404f77123 100644 --- a/lib/Doctrine/Common/Proxy/ProxyGenerator.php +++ b/lib/Doctrine/Common/Proxy/ProxyGenerator.php @@ -37,7 +37,7 @@ class ProxyGenerator * Used to match very simple id methods that don't need * to be decorated since the identifier is known. */ - const PATTERN_MATCH_ID_METHOD = '((public\s)?(function\s{1,}%s\s?\(\)\s{1,})\s{0,}{\s{0,}return\s{0,}\$this->%s;\s{0,}})i'; + const PATTERN_MATCH_ID_METHOD = '((public\s+)?(function\s+%s\s*\(\)\s*)\s*{\s*return\s*\$this->%s;\s*})i'; /** * The namespace that contains all proxy classes.