Skip to content

Commit

Permalink
Merge pull request #350 from 4alexandr/master
Browse files Browse the repository at this point in the history
Made PATTERN_MATCH_ID_METHOD more flexible
  • Loading branch information
Ocramius committed Aug 31, 2015
2 parents ff72726 + 74fc182 commit 7d4f8e4
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 7d4f8e4

Please sign in to comment.