SideEffect.php 827 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace staabm\SideEffectsDetector;
  3. /**
  4. * @api
  5. */
  6. final class SideEffect {
  7. /**
  8. * die, exit, throw.
  9. */
  10. const PROCESS_EXIT = 'process_exit';
  11. /**
  12. * class definition, func definition, include, require, global var, unset, goto
  13. */
  14. const SCOPE_POLLUTION = 'scope_pollution';
  15. /**
  16. * fwrite, unlink...
  17. */
  18. const INPUT_OUTPUT = 'input_output';
  19. /**
  20. * echo, print.
  21. */
  22. const STANDARD_OUTPUT = 'standard_output';
  23. /**
  24. * code for sure has side-effects, we don't have enough information to classify it.
  25. */
  26. const UNKNOWN_CLASS = 'unknown_class';
  27. /**
  28. * code might have side-effects, but we can't tell for sure.
  29. */
  30. const MAYBE = 'maybe_has_side_effects';
  31. private function __construct() {
  32. // nothing todo
  33. }
  34. }