phpcbf(1)

πŸ“¦ version 3.7.2, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– 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 is iso-8859-1) πŸ”€
  • extensions β€” a comma separated list of file extensions to fix. you can also say what type the file is using ext/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 is 1) ⚑
  • 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 all phpcs: 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