Skip to content

Commit

Permalink
Made PATTERN_MATCH_ID_METHOD more flexible
Browse files Browse the repository at this point in the history
PATTERN_MATCH_ID_METHOD match any valid function declaration, example:
function getId(){return$this->id;}
  • Loading branch information
4alexandr committed Jan 23, 2015
1 parent b44549d commit 74fc182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/Common/Proxy/ProxyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 74fc182

Please sign in to comment.