# 使用 Homebrew, dnf 安装 php-code-sniffer

查看 php-code-sniffer 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:php-code-sniffer
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install php-code-sniffer
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install php-pear-PHP-CodeSniffer
```

  证据: Fedora Rawhide package metadata: php-pear-PHP-CodeSniffer from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

## 软件包事实

- **软件包键:** brew:php-code-sniffer
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/php-code-sniffer>
- **版本:** 4.0.1
- **来源摘要:** Check coding standards in PHP, JavaScript and CSS
- **主页:** <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.1/phpcs.phar>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- phpcbf (cli)
- phpcs (cli)
- phpcbf (别名)
- phpcs (别名)

## 依赖

- php

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 4.0.1
- 本地数据: OK
- 上游仓库: https://github.com/PHPCSStandards/PHP_CodeSniffer
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.

## 安全说明

escape, surveillance, or offensive capability signal.

- **Geiger 风险:** red / 中
- escape, surveillance, or offensive capability signal


## 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

- Unix: ./.phpcs.xml, ./phpcs.xml, ./phpcs.xml.dist, ./ruleset.xml
## 源数据库详情

- **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:** stable

## 其他软件包管理器记录

- dnf - php-pear-PHP-CodeSniffer - 4.0.1-3.fc45: installed executable or alias match | Fedora Rawhide package metadata: php-pear-PHP-CodeSniffer from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | PHP coding standards enforcement tool | https://github.com/PHPCSStandards/PHP_CodeSniffer


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [php](https://pkg.so/zh-hans/brew/php/) - Runtime dependency declared by Homebrew.
- [precious](https://pkg.so/zh-hans/brew/precious/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, linting.
- [jslint4java](https://pkg.so/zh-hans/brew/jslint4java/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, linting.
- [prek](https://pkg.so/zh-hans/brew/prek/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools.
- [php-cs-fixer](https://pkg.so/zh-hans/brew/php-cs-fixer/) - Shares pkgdb curated category or tags: cli, code-quality, coding-standards, developer-tools, php.
- [jscpd](https://pkg.so/zh-hans/brew/jscpd/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools.
- [pint](https://pkg.so/zh-hans/brew/pint/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools.
- [codelimit](https://pkg.so/zh-hans/brew/codelimit/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools.
- [hello](https://pkg.so/zh-hans/brew/hello/) - Shares pkgdb curated category or tags: cli, coding-standards, developer-tools.
- [jslint](https://pkg.so/zh-hans/npm/jslint/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, code, code-quality, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/php-code-sniffer.yml](https://github.com/mxcl/pkgdb/blob/main/combined/php-code-sniffer.yml)


## 来源

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