定制 devstrict/phpcs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

devstrict/phpcs

最新稳定版本:v0.2.4

Composer 安装命令:

composer require --dev devstrict/phpcs

包简介

Custom PHP_CodeSniffer ruleset for strict development standards

README 文档

README

CI License: MIT PHPStan PHP-CS-Fixer PHPUnit PHP Version

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.3 or higher
  • Composer

Install via Composer

composer require --dev devstrict/phpcs

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 DevStrict rules -->
    <rule ref="DevStrict"/>
</ruleset>

Rulesets

DevStrict

The main ruleset includes all available rules. See RULES.md for detailed documentation of each rule.

Core Rules:

Yii2 Framework Rules:

Development

Guidelines

  • All new sniffs must have tests
  • Follow the existing code style
  • Update documentation when necessary
  • Ensure all checks pass (composer check)

License

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

Additional Resources

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-15