Pure.php 665 B

12345678910111213141516171819202122
  1. <?php
  2. namespace JetBrains\PhpStorm;
  3. use Attribute;
  4. /**
  5. * The attribute marks the function that has no impact on the program state or passed parameters used after the function execution.
  6. * This means that a function call that resolves to such a function can be safely removed if the execution result is not used in code afterwards.
  7. *
  8. * @since 8.0
  9. */
  10. #[Attribute(Attribute::TARGET_FUNCTION | Attribute::TARGET_METHOD)]
  11. class Pure
  12. {
  13. /**
  14. * @param bool $mayDependOnGlobalScope Whether the function result may be dependendent on anything except passed variables
  15. */
  16. public function __construct(bool $mayDependOnGlobalScope = false)
  17. {
  18. }
  19. }