macOS
brew install php-code-snifferlocal Homebrew formula metadata
安装
brew install php-code-snifferlocal Homebrew formula metadata
sudo dnf install php-pear-PHP-CodeSnifferFedora Rawhide package metadata · php-pear-PHP-CodeSniffer · 来源: dl.fedoraproject.org
概览
Check coding standards in PHP, JavaScript and CSS
历史
PHP_CodeSniffer is an extensible command-line linter and fixer that tokenizes source files and checks them against defined coding standards.
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.
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.
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.
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.
安全态势
escape, surveillance, or offensive capability signal.
red 风险 · 中 置信度 · escape-surveillance-offensive
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
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.
Config paths the tool may read or write during local use.
./.phpcs.xml./phpcs.xml./phpcs.xml.dist./ruleset.xml可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
phpcbf | cli | 全局可执行文件 | |
phpcs | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/PHPCSStandards/PHP_CodeSniffer
安装元数据
| 软件包键 | brew:php-code-sniffer |
|---|---|
| 版本 | 4.0.4 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/php-code-sniffer |
| 主页 | https://github.com/PHPCSStandards/PHP_CodeSniffer |
| 仓库 | https://github.com/PHPCSStandards/PHP_CodeSniffer |
| 许可证 | BSD-3-Clause |
| 源码归档 | https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/4.0.4/phpcs.phar |
| 最后更新 | 2026-10-06T14:42:33+03:00 |
| Pulse | updated |
| 依赖 | php |
| Bottle | 可用 (于 all) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | php-code-sniffer |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.