ghostwriter/psalm-plugin

为 Psalm 提供插件

资助包维护!
ghostwriter

安装次数: 1,880,488

依赖项: 5

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 4

类型:psalm-plugin

0.2.0 2023-08-27 13:19 UTC

This package is auto-updated.

Last update: 2024-08-31 16:08:45 UTC


README

Automation Supported PHP Version GitHub Sponsors Code Coverage Type Coverage Latest Version on Packagist Downloads

Psalm 提供一个 ALL-IN-ONE 插件

用法

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

安全

如果您发现任何与安全相关的问题,请使用 安全通告 而不是使用问题跟踪器。

致谢

许可

The BSD-3-Clause. 更多信息请参阅 许可文件