Skip to content
P

PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files

by PHPCSStandardsFree

#941in Productivity
0In stores

Description

PHP_CodeSniffer is a set of two PHP command line tools. The phpcs script tokenizes your PHP files and reports violations of a coding standar…

Highlights

  • Detects coding standard violations with phpcs
  • Fixes many violations automatically with phpcbf
  • Default PSR-12 standard, with custom standards
  • Installs as a Phar, through Composer, Phive or Git
  • Requires PHP 7.2 or newer

Ratings & Reviews

No ratings yet

Be the first to rate PHP_CodeSniffer.

People also visit

P

Phpinsights

Instant PHP quality checks from your console

Productivity
Launch
P

php-best-practices

PHP 8.x modern patterns, PSR standards, and SOLID principles

AI Skills
Get
P

PHP Censor

PHP Censor is an open source self-hosted continuous integration server

Developer Tools
Launch
P

PhpCodeArcheology/PhpCodeArcheology

PHP static analysis: code quality metrics, problem detection

AI Skills
Get
W

woocommerce-code-review

Review WooCommerce code changes for coding standards compliance

AI Skills
Get
C

Checkpoint

Laravel Security Tool

Productivity
Launch

PHP_CodeSniffer FAQ

What does PHP_CodeSniffer do?

It checks PHP files against a coding standard and reports violations, and phpcbf can fix many of them automatically.

Which PHP version do I need?

PHP 7.2.0 or greater, according to the requirements section.

How do I install it?

Download the signed phpcs and phpcbf Phar files, or install with Composer, Phive or a Git clone.

Which coding standard is used by default?

PSR-12. You can configure your own standard with a configuration file.

Is this the same as the old Squizlabs package?

It is the official continuation of PHP_CodeSniffer, which the README says Squizlabs created and has abandoned.

Is it free?

Yes. It is open source and the code is on GitHub.

What are the best PHP_CodeSniffer alternatives?

Popular alternatives to PHP_CodeSniffer include Phpinsights, Checkpoint and Phpmnd. See all PHP_CodeSniffer alternatives

Developer Stuff

Badges