`assertSame(NAN, ...)` should emit an error

Open
#140 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
testing

Research direction

Start by locating the PHPUnit rule or handler for assertSame and its existing tests. Add coverage for comparing NAN, ensure the diagnostic recommends assertNan, and run the relevant PHPUnit rule tests to confirm the warning.

Written by the indexing model from the issue text.

Description

assertSame uses === php operator and NAN === NAN is false

we should advise to use assertNan

Dominant language
PHP
Stars
544
Forks
58
Avg merge
2d 1h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phpstan/phpstan-phpunit

All issues in phpstan/phpstan-phpunit

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.