AssertEqualsWithCountRule?
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
Well AssertEqualsIsDiscouragedRule will already pick this up and recommend assertSame call so you'll eventually get to assertCount by following this chain of reported errors 😊
Adding yet another rule would mean that you'd get two different errors for $this->assertEquals(45, count($actual));, each one recommending something different.
Of course tailoring AssertEqualsIsDiscouragedRule for $this->assertEquals(45, count($actual)); and letting it recommend assertCount directly would be useful, so feel free to contribute that.