AssertEqualsWithCountRule?

Open
#236 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reading src/Rules/PHPUnit/AssertSameWithCountRule.php and compare its behavior with the requested AssertEqualsWithCountRule. Done means the analogous rule recognizes assertEquals(45, count($actual)) and reports the assertCount(45, $actual) replacement, with the behavior verified against the project’s existing rule checks.

Written by the indexing model from the issue text.

Description

We have the AssertSameWithCountRule rule:
https://github.com/phpstan/phpstan-phpunit/blob/2.0.x/src/Rules/PHPUnit/AssertSameWithCountRule.php

is there a reason for not having AssertEqualsWithCountRule

so that $this->assertEquals(45, count($actual)); would become $this->assertCount(45, $actual);

I can make a pull request I just wanted to make sure if there were a reason

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.