-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Mark pure function by Psalm #141
Comments
That would be a great idea. Of course, we don't want to do that manually. |
Just found in https://github.com/vimeo/psalm/tree/master/src/Psalm/Internal/Stubs @muglug Am I right? |
Impure builtin functions are listed here: https://github.com/vimeo/psalm/blob/master/src/Psalm/Internal/Codebase/Functions.php#L280 All others are assumed pure |
Excellent! Thanks a lot! |
@muglug how do you test your function isCallMapFunctionPure() ? Do you use some selected example that you know are pure or impure, or do you have a more general approach? |
…upport psalm annotations yet thecodingmachine/safe#141
…upport psalm annotations yet thecodingmachine/safe#141
…upport psalm annotations yet thecodingmachine/safe#141
* create mutators * avaible only string param * unit tests * cs-fix * mutatesNode rule * coallesce on mutators * regex only removes carret and dolar * code format * riddiculus pretty fix * Add mutators to schema.json, add more tests, add psalm annotations, add support for all possible delimiters * Add psalm issues to baseline because thecodingmachine/safe does not support psalm annotations yet thecodingmachine/safe#141 * Add test with an unpacked array * Simplify code by using ?? operator Co-authored-by: bernard.van.der.esch <[email protected]> Co-authored-by: Bernard van der Esch <[email protected]>
https://psalm.dev/articles/immutability-and-beyond#purity
The text was updated successfully, but these errors were encountered: