phpcbf(1)
π phpcbf β from the General Commands Manual (section 1, bestie, we're in the big leagues) π
β¨ NAME β¨
phpcbf β the icon that automatically fixes errors found by PHPCS π«Ά
πΈ SYNOPSIS πΈ
phpcbf [-nwli] [-d key[=value]] [--ignore-annotations]
[--bootstrap=bootstrap] [--standard=standard] [--sniffs=sniffs]
[--exclude=sniffs] [--suffix=suffix] [--severity=severity]
[--error-severity=severity] [--warning-severity=severity]
[--tab-width=tabWidth] [--encoding=encoding] [--parallel=processes]
[--basepath=basepath] [--extensions=extensions] [--ignore=patterns]
[--stdin-path=stdinPath] [--file-list=fileList] [--filter=filter]
file ...
π¦ DESCRIPTION π¦
okay so phpcbf (or, in its full government name, PHP Code Beautifier and Fixer) is a PHP script whose whole job is to automatically fix as many sniff violations as possible. she's not just gonna tell you what's wrong β she's gonna fix it. main character energy fr fr π
π PARAMETERS π
basepathβ a path you want stripped off the front of file paths inside reports βοΈbootstrapβ a comma separated list of files to run before processing starts πencodingβ the encoding of the files being fixed (default isiso-8859-1) π€extensionsβ a comma separated list of file extensions to fix. you can also say what type the file is usingext/type; e.g.,module/php,es/jsποΈfileβ one or more files and/or directories to fix πfileListβ a file containing a list of files and/or directories to check (one per line) πfilterβ use either the"gitmodified"or"gitstaged"filter, or specify the path to a custom filter class πpatternsβ a comma separated list of patterns to ignore files and directories πprocessesβ how many files should be fixed simultaneously (default is1) β‘severityβ the minimum severity required to fix an error or warning πsniffsβ a comma separated list of sniff codes to include or exclude from fixing (all sniffs must be part of the specified standard) πstandardβ the name or path of the coding standard to use πstdinPathβ if processing STDIN, the file path that STDIN will be processed as π§¬suffixβ write modified files to a filename using this suffix ("diff"and"patch"are not used in this mode) π·οΈtabWidthβ the number of spaces each tab represents ββ‘οΈ
π OPTION π
-nβ do not fix warnings (shortcut for--warning-severity=0) π€-wβ fix both warnings and errors (on by default) πͺ-lβ local directory only, no recursion π-pβ show progress of the run π-qβ quiet mode; disables progress and verbose output π€«-vβ print processed files π-vvβ print ruleset and token output π§Ύ-vvvβ print sniff processing information π¬-iβ show a list of installed coding standards π-dβ set the key php.ini value to value or true if value is omitted βοΈ--helpβ print the help message π--versionβ print version information π·οΈ--ignore-annotationsβ ignore allphpcs:annotations in code comments π«π
π SEE ALSO π
phpcs(1)β her sister, the one who just reports the problems π
and that's the whole vibe check, bestie π«Ά this page is from the phpcbf(1) manual, dated 2018-02-27, and it lives in section 1 of the manual pages. go fix some code, you got this, no cap πβ¨π
π¦ where this page comes from
- debian bookworm: php-codesniffer 3.7.1-2 Β· BSD-3-Clause
- ubuntu jammy: php-codesniffer 3.6.2-1 Β· BSD-3-Clause
- ubuntu noble: php-codesniffer 3.7.2-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms