PHP_CodeSniffer <> is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.

Phpactor can use PHP_CodeSniffer to:

  • format your code via the LSP textDocument/formatting action,

  • provide diagnostics for potential fixes,

To do so you set php_code_sniffer.enabled:

$ phpactor config:set php_code_sniffer.enabled true