承接 odan/phpstan-rules 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

odan/phpstan-rules

最新稳定版本:0.2.0

Composer 安装命令:

composer require odan/phpstan-rules

包简介

PHPStan rules

README 文档

README

Latest Version on Packagist Software License Total Downloads

A collection of PHPStan rules.

Requirements

  • PHP 8.2+

Installation

composer require odan/phpstan-rules --dev 

To use the PHPStan rules, you need to include the classes in your PHPStan configuration file phpstan.neon.

Just pick the rule(s) you want:

rules: - Odan\PHPStan\Rules\AssignmentInConditionRule - Odan\PHPStan\Rules\YodaConditionRule

If you want to include all rules, you have to include rules.neon in your project's PHPStan config:

includes: - vendor/odan/phpstan-rules/rules.neon

Register CyclomaticComplexityRule in phpstan.neon

Add a new service configuration and change the maxComplexity as needed.

services: - class: Odan\PHPStan\Rules\CyclomaticComplexityRule arguments: maxComplexity: 3 tags: - phpstan.rules.rule 

Note: If exists, remove the rule Odan\PHPStan\Rules\CyclomaticComplexityRule from the rules: section in phpstan.neon

Rules

  • AssignmentInConditionRule
  • YodaConditionRule
  • CyclomaticComplexityRule

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固