@@ -14,14 +14,17 @@ endfunction
14
14
15
15
call s: initVariable (" g:php_cs_fixer_path" , " ~/php-cs-fixer.phar" )
16
16
call s: initVariable (" g:php_cs_fixer_level" , " all" )
17
- call s: initVariable (" g:php_cs_fixer_config" , " default" )
18
17
call s: initVariable (" g:php_cs_fixer_php_path" , " php" )
19
- call s: initVariable (" g:php_cs_fixer_fixers_list" , " " )
20
18
call s: initVariable (" g:php_cs_fixer_default_mapping" , 1 )
21
19
call s: initVariable (" g:php_cs_fixer_dry_run" , 0 )
22
20
call s: initVariable (" g:php_cs_fixer_verbose" , 0 )
23
21
24
- let g: php_cs_fixer_command = g: php_cs_fixer_php_path .' ' .g: php_cs_fixer_path .' fix --config=' .g: php_cs_fixer_config
22
+ let g: php_cs_fixer_command = g: php_cs_fixer_php_path .' ' .g: php_cs_fixer_path .' fix'
23
+
24
+ if exists (' g:php_cs_fixer_config' )
25
+ let g: php_cs_fixer_command = g: php_cs_fixer_command .' --config=' .g: php_cs_fixer_config
26
+ endif
27
+
25
28
26
29
fun ! PhpCsFixerFix (path , dry_run)
27
30
let command = g: php_cs_fixer_command .' ' .a: path
@@ -31,7 +34,7 @@ fun! PhpCsFixerFix(path, dry_run)
31
34
let command = command .' --dry-run'
32
35
endif
33
36
34
- if strlen ( g: php_cs_fixer_fixers_list )
37
+ if exists ( ' g:php_cs_fixer_fixers_list' )
35
38
let command = command .' --fixers=' .g: php_cs_fixer_fixers_list
36
39
endif
37
40
0 commit comments