承接 frankvanhest/phpstan-rules-no-magic 相关项目开发

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

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

frankvanhest/phpstan-rules-no-magic

最新稳定版本:v3.0.0

Composer 安装命令:

composer require frankvanhest/phpstan-rules-no-magic

包简介

PHPStan rules inspired by roave/dont https://github.com/Roave/Dont

README 文档

README

Basically these rules prevent you from using PHP magic methods. If you are looking for a Runtime usage prevention of these methods, use https://github.com/Roave/Dont.

Installation

composer require frankvanhest/phpstan-rules-no-magic

Usage

Just include the following in your phpstan.neon file to prevent the methods __call, __callStatic, __clone , __wakeup, __unserialize, unserialize, __get, __sleep, __serialize, serialize, __set and __toString.

includes:
    - vendor/frankvanhest/phpstan-rules-no-magic/config/no-magic.neon

Of course, you can customize which methods should be prevented by choosing the desired rules.

For __call:

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicCallRule

For __callStatic:

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicCallStaticRule

For __clone:

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicCloneRule

For __wakeup, __unserialize and unserialize (use of Serializable interface):

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicDeserializeRule

For __get:

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicGetRule

For __sleep, __serialize and serialize (use of Serializable interface):

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicSerializeRule

For __set:

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicSetRule

For __toString:

rules:
    - FrankVanHest\PhpStanRulesNoMagic\NoMagicToStringRule

Contribution

Feel free to submit an issue of pull request. When it comes to a pull request I'm curious of how it improves this packages of which problem it may solve.

There are some requirements:

  • Use PSR-12 for code styling
  • Write a test for every meaningful change

License

See LICENCE

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固