定制 korbeil/phpstan-generic-rules 二次开发

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

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

korbeil/phpstan-generic-rules

最新稳定版本:v2.1.0

Composer 安装命令:

composer require korbeil/phpstan-generic-rules

包简介

Generic rules extensions for PHPStan

README 文档

README

Rules list

Debug rules

  • You should not have var_dump, exit or die function calls
  • If you have symfony/var-dumper, you should not have dump or die function calls

MbString rules

  • You should use multibyte string function when it exists

Installation

We assume that PHPStan is already installed in your project.

To use this extension, require it in Composer:

composer require --dev korbeil/phpstan-generic-rules

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include phpstan-strict-rules.neon in your project's PHPStan config:

includes:
    - vendor/korbeil/phpstan-generic-rules/extension.neon

Advanced usage

You can configure this library with parameters:

parameters:
    generic_rules:
        never_empty_rule: true # To enable the never empty rule
        debug_rule: false  # To disable the debug rule
        mb_string_rules: false  # To disable the mb_string rule

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-12