# squizlabs/PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

Repository: https://github.com/squizlabs/PHP_CodeSniffer
Canonical: https://ross.abutalabs.com/products/php_codesniffer
Language: PHP
License: BSD-3-Clause
License Family: permissive
Topics: php, coding-standards, automation, cli, qa, static-analysis
Last push: 2024-04-01T20:37:32+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5417, "days_push": 884, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10779, forks 1449 (observed 2026-08-28T04:10:44.243103+00:00)

## What it is
PHP_CodeSniffer is a pair of PHP CLI scripts (phpcs and phpcbf) that tokenize PHP, JavaScript, and CSS files to detect violations of defined coding standards and automatically fix them. This original squizlabs repository has been abandoned in favor of the PHPCSStandards/PHP_CodeSniffer successor.

## Use cases
- enforce coding standards in php projects
- automatically fix code style violations
- run code style checks in ci pipeline
- lint php files against psr standards
- keep team codebase consistent

## When to choose
- you need battle-tested php coding standard enforcement with auto-fixing
- you want psr-1/psr-12 or custom sniff-based standards
- you need a phar or composer-installable linter for legacy php versions

## When to avoid
- starting a new project - use the maintained PHPCSStandards/PHP_CodeSniffer fork instead
- you need linting for languages beyond php, js, and css
- you need deep static analysis rather than style checking

## Facets
- artifact type: cli-tool
- maturity: abandoned
- function: linter, formatter, cli, developer-tools
- domain: developer-tools, testing
- platform: php, cli, cross-platform
- tags: static-analysis, coding-standards, phpcs, phpcbf, code-style, qa, command-line, automation

## Member repositories
- squizlabs/PHP_CodeSniffer (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:44.243103+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:17:52.289013+00:00, confidence not recorded.
  - readme: https://github.com/squizlabs/PHP_CodeSniffer (fetched 2026-08-28T04:10:44.243103+00:00, sha 34bf73bfe562)
- Data as of 2026-08-30T08:39:29.467469+00:00.
