# slevomat/coding-standard

Slevomat Coding Standard for PHP_CodeSniffer provides many useful sniffs

Repository: https://github.com/slevomat/coding-standard
Canonical: https://ross.abutalabs.com/products/coding-standard
Language: PHP
License: MIT
License Family: permissive
Topics: php, php7, php8, coding-standard, code-style, phpcs, phpcodesniffer
Last push: 2026-08-14T13:04:19+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 95, longevity 100
- inputs: {"age_days": 3909, "days_push": 19, "days_rel": 33, "gap_med": 16, "n_releases_24m": 28}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1480, forks 193 (observed 2026-08-28T04:04:50.881354+00:00)

## What it is
A collection of PHP_CodeSniffer sniffs for PHP covering functional safety, dead code detection, and code formatting rules. Many sniffs support automatic error fixing and local suppression.

## Use cases
- enforce consistent code style in a PHP project
- detect dead code and unused imports
- automatically fix formatting errors with phpcbf
- add extra sniffs beyond PHP_CodeSniffer defaults
- require trailing commas and sorted arrays in PHP codebases

## When to choose
- you already use PHP_CodeSniffer and want stricter, more opinionated rules
- you want auto-fixable style and cleanliness sniffs for PHP 7/8 code

## When to avoid
- you use a different language than PHP
- you prefer PSR-12 only or a formatter like PHP-CS-Fixer instead of phpcs sniffs

## Facets
- artifact type: library
- maturity: active
- function: linter, formatter, developer-tools
- domain: developer-tools, programming-languages, testing
- platform: php, cli
- tags: phpcs, coding-standard, code-style, sniffs, static-analysis

## Member repositories
- slevomat/coding-standard (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:50.881354+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-30T04:34:16.172781+00:00, confidence not recorded.
  - readme: https://github.com/slevomat/coding-standard (fetched 2026-08-28T04:04:50.881354+00:00, sha 9ab613a82477)
- Data as of 2026-08-30T08:39:29.467469+00:00.
