Skip to content

Impure wordpress functions #460

@PeterSmith8nss

Description

@PeterSmith8nss

I think the following WordPress functions should be listed as impure (e.g. add comment @phpstan-impure in function header) because calling them with the same values at different times can yield different results:

  1. wp_mail - success and failure of the call, even if parameters are the same, depends on the state of the system, so can vary with time
  2. get_transient - other calls can alter the value of the transient between get_transient calls for the same transient

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions