We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Subject can be string|string[] https://www.php.net/manual/en/function.preg-replace-callback.php
string|string[]
https://psalm.dev/r/09ffdd3f6a
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** @param string[] $ids */ function(array $ids): array { return \preg_replace_callback('', fn (array $matches) => $matches[4], $ids); };
Psalm output (using commit fc8212e): INFO: PossiblyUndefinedIntArrayOffset - 5:62 - Possibly undefined array offset 'int(4)' is risky given expected type 'array-key'. Consider using isset beforehand. INFO: MissingClosureReturnType - 5:39 - Closure does not have a return type, expecting mixed INFO: MixedArgumentTypeCoercion - 5:39 - Argument 2 of preg_replace_callback expects callable(array<int, string>):string, parent type Closure(array<array-key, mixed>):mixed provided ERROR: InvalidArgument - 5:75 - Argument 3 of preg_replace_callback expects string, array<array-key, string> provided
Sorry, something went wrong.
9b86021
No branches or pull requests
Subject can be
string|string[]
https://www.php.net/manual/en/function.preg-replace-callback.phphttps://psalm.dev/r/09ffdd3f6a
The text was updated successfully, but these errors were encountered: