Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntityRepository::count should return positive int #603

Closed
kevinpapst opened this issue Aug 20, 2024 · 2 comments · Fixed by #604
Closed

EntityRepository::count should return positive int #603

kevinpapst opened this issue Aug 20, 2024 · 2 comments · Fixed by #604

Comments

@kevinpapst
Copy link
Contributor

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
Copy link
Member

Open a pull request with this change, thanks!

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants