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