@@ -90,7 +90,7 @@ let s:php_regex_ns_line = '^namespace\_s\+[\\_A-Za-z0-9]*\_s*[;{]'
9090let s: php_regex_use_line= ' ^use\_s\+[\\_A-Za-z0-9]\+\%(\_s\+as\_s\+[_A-Za-z0-9]\+\)\?\_s*\%(,\_s\+[\\_A-Za-z0-9]\+\%(\_s\+as\_s\+[_A-Za-z0-9]\+\)\?\_s*\)*;'
9191let s: php_regex_class_line= ' ^\%(\%(final\s\+\|abstract\s\+\)\?class\>\|trait\>\)'
9292let s: php_regex_const_line= ' ^\s*const\s\+[^;]\+;'
93- let s: php_regex_member_line= ' ^\s*\%(\%(private\|protected\|public\|static\)\s*\)\+\$'
93+ let s: php_regex_member_line= ' ^\s*\%(\%(private\|protected\|public\|static\)\%(\_s\+?\?[\\|_A-Za-z0-9]\+\)\?\ s*\)\+\$'
9494let s: php_regex_func_line= ' ^\s*\%(\%(private\|protected\|public\|static\|abstract\)\s*\)*function\_s\+'
9595
9696let s: php_regex_local_var= ' \$\<\%(this\>\)\@![A-Za-z0-9]*'
@@ -193,14 +193,14 @@ function! PhpRenameClassVariable() " {{{
193193let l: oldName= substitute (expand (' <cword>' ),' ^\$*' ,' ' ,' ' )
194194let l: newName= inputdialog (' Rename' .l: oldName .' to:' )
195195if g: vim_php_refactoring_auto_validate_rename== 0
196- if s: PhpSearchInCurrentClass (' \C\%(\%(\%(public\|protected\|private\|static\)\_s\+\)\+\$\|$this->\)\@<=' .l: newName .' \>' ,' n' ) > 0
196+ if s: PhpSearchInCurrentClass (' \C\%(\%(\%(public\|protected\|private\|static\)\%(\_s\+?\?[\\|_A-Za-z0-9]\+\)\?\ _s\+\)\+\$\|$this->\)\@<=' .l: newName .' \>' ,' n' ) > 0
197197call s: PhpEchoError (l: newName .' seems to already exist in the current class. Rename anyway ?' )
198198if inputlist ([" 0. No" ," 1. Yes" ])== 0
199199return
200200endif
201201endif
202202endif
203- call s: PhpReplaceInCurrentClass (' \C\%(\%(\%(public\|protected\|private\|static\)\_s\+\)\+\$\|$this->\)\@<=' .l: oldName .' \>' ,l: newName )
203+ call s: PhpReplaceInCurrentClass (' \C\%(\%(\%(public\|protected\|private\|static\)\%(\_s\+?\?[\\|_A-Za-z0-9]\+\)\?\ _s\+\)\+\$\|$this->\)\@<=' .l: oldName .' \>' ,l: newName )
204204endfunction
205205" }}}
206206