Suggest assertTrue()/assertFalse() over assertSame(true|false, ...)
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #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分
- マージ済み PR(30日)
- 68
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
freelawproject/courtlistener#8406 ·
メンテナーはふだん 2 日以内に返信
-
good first issue help wanted level 1 wocs
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GianlucaBave/murmury#49 ·
メンテナーはふだん 1 日以内に返信
-
regression skipped skipped_bmg
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
intel/torch-xpu-ops#6142 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
ci-flake kind:tests size:S type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
elsa-workflows/elsa-foundation#4058 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信