vix/phpcs-sniffs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vix/phpcs-sniffs

Composer 安装命令:

composer require --dev vix/phpcs-sniffs

包简介

Custom PHP_CodeSniffer ruleset for strict development standards

README 文档

README

PHPStan Tests PHP Version License: MIT

A comprehensive set of strict PHP_CodeSniffer rules for general PHP, Laravel, and Yii2 projects to maintain high code quality standards in your projects.

Installation

Requirements

  • PHP 8.4 or higher
  • Composer

Install via Composer

composer require --dev vix/phpcs-sniffs

Usage

Basic Configuration

Create a phpcs.xml file in your project root:

<?xml version="1.0"?>
<ruleset name="MyProject">
    <description>My project coding standard</description>

    <!-- Paths to check -->
    <file>src</file>
    <file>tests</file>

    <!-- Use VixPHPCS rules -->
    <rule ref="VixPHPCS"/>
</ruleset>

Sniffs

The package ships with the VixPHPCS ruleset. Alternatively, individual standalone sniffs can be enabled manually. The catalog includes return-type consistency rules such as forbidding nullable bool returns in function and method signatures/docblocks. See docs/SNIFFS.md for the full catalog, examples, and configurable parameters.

Development

Guidelines

  • All new sniffs must have tests
  • Follow the existing code style
  • Update documentation when necessary
  • Ensure all checks pass (composer test and composer static-analysis)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Additional Resources

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固