Skip to content

Commit 544b881

Browse files
committed
Option to disable the user validation of getters/setters creation
1 parent 90d72a7 commit 544b881

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ let g:vim_php_refactoring_use_default_mapping = 0
3232
If you want to disable the user validation at the getter/setter creation, just add this line in your `~/.vimrc` file
3333

3434
```
35-
let g:vim_php_refactoring_auto_validate = 1
35+
let g:vim_php_refactoring_auto_validate_sg = 1
3636
```
3737

3838
## Default Mappings

plugin/php-refactoring-toolbox.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" Maintainer: Pierrick Charron <pierrick@adoy.net>
55
" URL: https://github.com/adoy/vim-php-refactoring-toolbox
66
" License: MIT
7-
" Version: 1.0.2
7+
" Version: 1.0.3
88
"
99

1010
" Config {{{
@@ -20,6 +20,10 @@ endif
2020
if !exists('g:vim_php_refactoring_auto_validate')
2121
let g:vim_php_refactoring_auto_validate = 0
2222
endif
23+
24+
if !exists('g:vim_php_refactoring_auto_validate_sg')
25+
let g:vim_php_refactoring_auto_validate_sg = g:vim_php_refactoring_auto_validate
26+
endif
2327
" }}}
2428

2529
" Refactoring mapping {{{
@@ -95,8 +99,8 @@ function! PhpCreateSettersAndGetters() " {{{
9599
endwhile
96100
for l:property in l:properties
97101
let l:camelCaseName = substitute(l:property, '^_\?\(.\)', '\U\1', '')
98-
call s:PhpEchoError('Create set' . l:camelCaseName . '() and get' . l:camelCaseName . '()')
99-
if g:vim_php_refactoring_auto_validate == 0
102+
if g:vim_php_refactoring_auto_validate_sg == 0
103+
call s:PhpEchoError('Create set' . l:camelCaseName . '() and get' . l:camelCaseName . '()')
100104
if inputlist(["0. No", "1. Yes"]) == 0
101105
continue
102106
endif

0 commit comments

Comments
 (0)