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

False negative on positive-int #8059

Open
danog opened this issue Jun 6, 2022 · 1 comment
Open

False negative on positive-int #8059

danog opened this issue Jun 6, 2022 · 1 comment

Comments

@danog
Copy link
Collaborator

danog commented Jun 6, 2022

positive-int is always > 0, not detected as a paradox: https://psalm.dev/r/314d217370

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/314d217370
<?php

	/**
	 * @param positive-int $pagesLimit
	 */
	function setPagesLimit(int $pagesLimit): void {
		if ($pagesLimit > 0) {
			echo $pagesLimit;
        }
	}
Psalm output (using commit 3a24488):

No issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants