Open kkmuffme opened 1 year ago
I found these snippets:
This seems intentional: https://github.com/vimeo/psalm/blob/c55692035219da63aa11de1ccc8a060620e091db/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php#L468
I have no idea why though... You could try to drop that and see if some test fail
@muglug do you have any memory why you excluded static string returns from having @psalm-pure added?
&& !$inferred_return_type->isSingleIntLiteral()
&& !$inferred_return_type->isSingleStringLiteral()
https://github.com/vimeo/psalm/commit/10f7031080bbdf776bb13340c351338bc92a61e4
https://psalm.dev/r/1b09635ea2
Psalter MissingPureAnnotation should add @psalm-pure here, but it doesn't. (same issue also when we have an array with static or partially static values)