It's very well explained in this comment: https://github.com/phpstan/phpstan-src/pull/2693#issuecomment-1784026934 TLDR the functionMap is not always correct. Safe should consider multiple resources for codegeneration.