ghostwriter / phpunit-psalm-plugin
为 Psalm 提供 插件
0.2.0
2023-08-27 13:19 UTC
Requires
- php: >=8.1
Requires (Dev)
- ghostwriter/coding-standard: dev-main
- ghostwriter/psalm-plugin-tester: ^0.2 || ^0.3 || ^1.0
- psr/container: ^1.1 || ^2.0
- vimeo/psalm: ^5.0 || ^6.0
This package is auto-updated.
Last update: 2024-08-31 16:08:45 UTC
README
提供 ALL-IN-ONE
插件,用于 Psalm
用法
composer require ghostwriter/psalm-plugin --dev
vendor/bin/psalm-plugin enable ghostwriter/psalm-plugin
vendor/bin/psalm
功能
-
PHP 标准建议
-
缓存
-
容器
- 解决
get
方法的返回类型。
- 解决
-
时钟
-
事件调度器
-
链接
-
日志
-
Http
-
-
PHPUnit
- 对于继承自
TestCase
的类,抑制MissingThrowsDocblock
- 对于继承自
TestCase
的类,抑制UnusedClass
- 对于继承自
TestCase
的类,抑制PropertyNotSetInConstructor
- 使用
assertPreConditions
方法 - 使用
setUp
方法 - 使用
setUpBeforeClass
方法 - 使用
@before
文档块 - 使用
@beforeClass
文档块 - 使用
#[Before]
属性 - 使用
#[BeforeClass]
属性 - 使用
#[PreCondition]
属性
- 使用
- 对于继承自
-
私有化
-
使每个没有子类的类最终化
(!isAbstract && !isAnonymous) -
如果可能,使抽象类上的每个类方法最终化
(!isAbstract && !isPrivate) -
如果可能,将受保护的类方法更改为私有
-
如果可能,将受保护的类属性更改为私有
-
-
严格类型
-
[请求功能]
变更日志
请参阅 CHANGELOG.md 以获取有关最近更改的更多信息。
安全性
如果您发现任何与安全相关的问题,请使用 安全咨询
而不是使用问题跟踪器。
致谢
许可证
BSD-3-Clause。有关更多信息,请参阅 许可证文件。