Suggest assertTrue()/assertFalse() over assertSame(true|false, ...)
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #198 来自 @alies-dev —— 已合并
评估
调研方向
Start with the plugin’s afterMethodCallAnalysis hook and the existing check for assertSame(null, ...), then inspect its helper and tests. Add coverage for literal true and false as the first argument to assertSame and assertNotSame, and confirm the plugin reports the suggested PHPUnit assertion; the issue estimates roughly 45 lines including tests.
由索引模型根据 Issue 内容生成。
描述
$this->assertSame(true, $isPaid) is clearer as $this->assertTrue($isPaid) and gives a better failure message.
phpstan-phpunit reports it (AssertSameBooleanExpectedRule).
Idea: same hook and helper as the assertSame(null, ...) check: in afterMethodCallAnalysis, detect a literal true/false first argument to assertSame/assertNotSame and emit a plugin issue. Roughly 45 lines with tests.
Idea borrowed from phpstan/phpstan-phpunit.
- 主要语言
- Gherkin
- 星标
- 79
- 派生
- 38
- 平均合并
- 3 小时 54 分钟
- 30 天内合并 PR
- 68
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
psalm/psalm-plugin-phpunit 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 45/100
psalm/psalm-plugin-phpunit#274 ·
维护者通常 1 天内回复
查看 psalm/psalm-plugin-phpunit 的全部 Issue
相似的 Issue
-
ci javascript tests
难度 2/5 1-3 小时 新手友好度 78/100
jonathanong/no-mistakes#3258 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
nikic/PHP-Parser#1186 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
wultra/powerauth-tests#980 ·
-
area: cpu-engines area: fuzzer good first issue
难度 2/5 1-3 小时 新手友好度 91/100
hffgzktbcc-blip/ounce-core#402 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
swc-project/swc-ai-issues#432 ·