.TH phpcbf 1 "2018-02-27" .SH NAME phpcbf - automatically fix errors found by PHPCS .SH SYNOPSIS .B phpcbf .RB [ \-nwli ] .RB [ \-d .IR key [\c .BI = value\c .RB ]]\ [ \-\-ignore-annotations ] .RB [ \-\-bootstrap=\c .IR bootstrap ] .RB [ \-\-standard=\c .IR standard ] .RB [ \-\-sniffs=\c .IR sniffs ] .RB [ \-\-exclude=\c .IR sniffs ] .RB [ \-\-suffix=\c .IR suffix ] .RB [ \-\-severity=\c .IR severity ] .RB [ \-\-error\-severity=\c .IR severity ] .RB [ \-\-warning\-severity=\c .IR severity ] .RB [ \-\-tab\-width=\c .IR tabWidth ] .RB [ \-\-encoding=\c .IR encoding ] .RB [ \-\-parallel=\c .IR processes ] .RB [ \-\-basepath=\c .IR basepath ] .RB [ \-\-extensions=\c .IR extensions ] .RB [ \-\-ignore=\c .IR patterns ] .RB [ \-\-stdin-path=\c .IR stdinPath ] .RB [ \-\-file\-list=\c .IR fileList ] .RB [ \-\-filter=\c .IR filter ] .IR file \ \.\.\. .SH DESCRIPTION .LP .B phpcbf (or PHP Code Beautifier and Fixer) is a PHP script to automatically fix as many sniff violations as possible. .SH PARAMETERS .LP .I basepath .IP A path to strip from the front of file paths inside reports .LP .I bootstrap .IP A comma separated list of files to run before processing starts .LP .I encoding .IP The encoding of the files being fixed (default is iso-8859-1) .LP .I extensions .IP A comma separated list of file extensions to fix. The type of the file can be specified using: ext/type; e.g., module/php,es/js .LP .I file .IP One or more files and/or directories to fix .LP .I fileList .IP A file containing a list of files and/or directories to check (one per line) .LP .I filter .IP Use either the "gitmodified" or "gitstaged" filter, or specify the path to a custom filter class .LP .I patterns .IP A comma separated list of patterns to ignore files and directories .LP .I processes .IP How many files should be fixed simultaneously (default is 1) .LP .I severity .IP The minimum severity required to fix an error or warning .LP .I sniffs .IP A comma separated list of sniff codes to include or exclude from fixing (all sniffs must be part of the specified standard) .LP .I standard .IP The name or path of the coding standard to use .LP .I stdinPath .IP If processing STDIN, the file path that STDIN will be processed as .LP .I suffix .IP Write modified files to a filename using this suffix ("diff" and "patch" are not used in this mode) .LP .I tabWidth .IP The number of spaces each tab represents .SH OPTION .LP .B \-n .IP Do not fix warnings (shortcut for .BR \-\-warning\-severity=0 ) .LP .B \-w .IP Fix both warnings and errors (on by default) .LP .B \-l .IP Local directory only, no recursion .LP .B \-p .IP Show progress of the run .LP .B \-q .IP Quiet mode; disables progress and verbose output .LP .BR \-v .IP Print processed files .LP .BR \-vv .IP Print ruleset and token output .LP .BR \-vvv .IP Print sniff processing information .LP .B \-i .IP Show a list of installed coding standards .LP .B \-d .IP Set the .I key php.ini value to .I value or .B true if .I value is omitted .LP .B \-\-help .IP Print the help message .LP .B \-\-version .IP Print version information .LP .B \-\-ignore\-annotations .IP Ignore all phpcs: annotations in code comments .SH "SEE ALSO" .BR phpcs (1)