File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,11 @@ function! PhpExtractClassProperty() " {{{
181181 normal mr
182182 let l: name = expand (' <cword>' )
183183 call s: PhpReplaceInCurrentFunction (' $' . l: name . ' \>' , ' $this->' . l: name )
184- call s: PhpInsertProperty (l: name , " private" )
184+ let l: visibility = inputdialog (" Visibility (default is private): " )
185+ if empty (l: visibility )
186+ let l: visibility = ' private'
187+ endif
188+ call s: PhpInsertProperty (l: name , l: visibility )
185189 normal `r
186190endfunction
187191" }}}
@@ -237,7 +241,11 @@ endfunction
237241
238242function ! PhpCreateProperty () " {{{
239243 let l: name = inputdialog (" Name of new property: " )
240- call s: PhpInsertProperty (l: name , " private" )
244+ let l: visibility = inputdialog (" Visibility (default is private): " )
245+ if empty (l: visibility )
246+ let l: visibility = ' private'
247+ endif
248+ call s: PhpInsertProperty (l: name , l: visibility )
241249endfunction
242250" }}}
243251
You can’t perform that action at this time.
0 commit comments