summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorDale Jung <dale@dalejung.com>2020-11-21 15:19:02 -0500
committerGitHub <noreply@github.com>2020-11-21 20:19:02 +0000
commit2873be2d6a5e383edd1fead396a53a8a38eebd76 (patch)
treed3607b2c6db4cb98c8c862ad07244ed136106c26 /autoload
parentd1246ea8d5d22e17fc8b6c6ace836d3eec89fa6d (diff)
downloadale-2873be2d6a5e383edd1fead396a53a8a38eebd76.zip
Add php phpcbf options (#3383)
* Taken from phpcs. add add_php_phpcbf_options #3382 * Updated docs for php_phpcbf_options #3382 * Added tests #3382
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fixers/phpcbf.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/ale/fixers/phpcbf.vim b/autoload/ale/fixers/phpcbf.vim
index f14b8406..0a61c657 100644
--- a/autoload/ale/fixers/phpcbf.vim
+++ b/autoload/ale/fixers/phpcbf.vim
@@ -2,6 +2,7 @@
" Description: Fixing files with phpcbf.
call ale#Set('php_phpcbf_standard', '')
+call ale#Set('php_phpcbf_options', '')
call ale#Set('php_phpcbf_executable', 'phpcbf')
call ale#Set('php_phpcbf_use_global', get(g:, 'ale_use_global_executables', 0))
@@ -20,6 +21,6 @@ function! ale#fixers#phpcbf#Fix(buffer) abort
\ : ''
return {
- \ 'command': ale#Escape(l:executable) . ' --stdin-path=%s ' . l:standard_option . ' -'
+ \ 'command': ale#Escape(l:executable) . ' --stdin-path=%s ' . l:standard_option . ale#Pad(ale#Var(a:buffer, 'php_phpcbf_options')) . ' -'
\}
endfunction