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

setlocale named arguments not correctly identified #9399

Closed
postme opened this issue Jun 6, 2023 · 2 comments
Closed

setlocale named arguments not correctly identified #9399

postme opened this issue Jun 6, 2023 · 2 comments
Labels

Comments

@postme
Copy link

postme commented Jun 6, 2023

Bug report

setlocale arguments not correctly identified

setlocale(category: LC_ALL, locales: 'nl_NL');

phpstan reports:
Missing parameter $locale (array|string|null) in call to function setlocale.
Unknown parameter $locales in call to function setlocale.

php documentation states:

setlocale(int $category, string $locales, string ...$rest): string|false
https://www.php.net/manual/en/function.setlocale.php

Code snippet that reproduces the problem

https://phpstan.org/r/a371d384-b5db-42bb-b01e-7668eb478d8f

Expected output

phpstan should not report an issue as the named arguments are according to php documentation

Did PHPStan help you today? Did it make you happy in any way?

Absolutely love phpstan, I bought a pro license

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src#2726

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 Dec 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants