pkg.soopen package index

brew / rank 3320

Install php-code-sniffer with Homebrew, dnf

Check coding standards in PHP, JavaScript and CSS. Version 4.0.4 via Homebrew; verified 2026-10-06. Also installable with dnf: sudo dnf install php-pear-PHP-CodeSniffer.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install php-code-sniffer

local Homebrew formula metadata

Linux

Fedora dnfverified · 92%
sudo dnf install php-pear-PHP-CodeSniffer

Fedora Rawhide package metadata · php-pear-PHP-CodeSniffer · source: dl.fedoraproject.org

overview

Package summary

Check coding standards in PHP, JavaScript and CSS

Commands and aliases

  • phpcbf
  • phpcs

history

Project history and usage

PHP_CodeSniffer is an extensible command-line linter and fixer that tokenizes source files and checks them against defined coding standards.

Project history

PHP_CodeSniffer originated at Squiz as a tokenizer-based coding-standard checker and fixer. It developed built-in standards, an extensible sniff architecture, machine-readable reports, and project rulesets.

Maintenance subsequently continued under the PHPCSStandards organization, whose official repository explicitly identifies the project as the continuation of the abandoned Squizlabs package.

Adoption history

PHP_CodeSniffer became a standard PHP development tool because coding policies can be represented as reusable standards and project rulesets, then applied consistently from terminals, editors, hooks, and continuous-integration jobs.

The PHPCSStandards repository describes itself as the official continuation of the package created by Squizlabs. It retains the established Composer package and the long-standing `phpcs` and `phpcbf` commands.

How it is used

Run `phpcs` against files or directories to report coding-standard violations, selecting a built-in, external, or project-defined standard as needed.

Run `phpcbf` to repair fixable violations. When no standard is supplied, PHP_CodeSniffer searches the current directory and its parents for `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist`, or `phpcs.xml.dist`, in that precedence order.

Why package nerds care

The package supplies two complementary executables: `phpcs` reports violations, while `phpcbf` automatically corrects violations for which a safe fixer exists.

Its discoverable project rulesets and installable external standards let one engine enforce PHP-FIG, framework, organization, or repository-specific conventions.

Timeline

  • 2000s: PHP_CodeSniffer begins in the Squiz ecosystem.
  • 2010s: Composer installation and project rulesets become established distribution and configuration workflows.
  • 2020s: PHPCSStandards becomes the official continuation of the Squizlabs project.

Related projects

  • PHP CS Fixer overlaps with PHP_CodeSniffer's automatic-repair workflow but is centered on configurable source rewriting.
  • Composer is an officially documented installation method for both global and project-local PHP_CodeSniffer use.

security posture

Risk level: red

escape, surveillance, or offensive capability signal.

Risk classifier

red risk · medium confidence · escape-surveillance-offensive

Why

  • escape, surveillance, or offensive capability signal

Signals

  • text:sniffer

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 1 platform targets.
  • Installs with 1 runtime dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
./.phpcs.xml./phpcs.xml./phpcs.xml.dist./ruleset.xml

executables

Installed executables

CommandKindExposureNote
phpcbfcliglobal executable
phpcscliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-11-04
manager version4.0.4
manager updated2026-10-06
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/PHPCSStandards/PHP_CodeSniffer

install metadata

Package metadata

Package keybrew:php-code-sniffer
Version4.0.4
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/php-code-sniffer
Homepagehttps://github.com/PHPCSStandards/PHP_CodeSniffer
Repositoryhttps://github.com/PHPCSStandards/PHP_CodeSniffer
LicenseBSD-3-Clause
Source archivehttps://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/4.0.4/phpcs.phar
Last updated2026-10-06T14:42:33+03:00
Pulseupdated
Dependenciesphp
Bottleavailable (on all)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namephp-code-sniffer
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

dnf92%

php-pear-PHP-CodeSniffer 4.0.4-1.fc45

PHP coding standards enforcement tool

https://github.com/PHPCSStandards/PHP_CodeSniffer

sudo dnf install php-pear-PHP-CodeSniffer
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: php-pear-PHP-CodeSniffer
  • 8 dependencies
  • 4 provides
  • installed executable or alias match
  • Matched by: Phpcs
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: php-pear-PHP-CodeSniffer from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/652278618dec9c023176a80c435a32a2c8154869fb0eb662c267a54df28d77d9-primary.xml.zst

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment
  • pkg.so package database
  • pkgdb category and tag curation