phpstan / phpstan-doctrine

Doctrine extensions for PHPStan
MIT License
595 stars 97 forks source link

EntityRepository::count should return positive int #603

Closed kevinpapst closed 2 months ago

kevinpapst commented 2 months ago

Adding this method to the EntityRepository.stub solves a few issues where positive integer are expected.

Afaik this method can never return a negative interger.

    /**
     * @param array<string, mixed> $criteria
     *
     * @return int<0, max>
     */
    public function count(array $criteria);

Never opened a PR here, so please advice how to proceed. Also I am puzzled whether return or phpstan-return or psalm-return is the correct way.

ondrejmirtes commented 2 months ago

Open a pull request with this change, thanks!

github-actions[bot] commented 1 month ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.