Ejemplo n.º 1
0
function inPreprocessedFile($callable)
{
    if (Utils\runningOnHHVM()) {
        return true;
    }
    if (Utils\isOwnName(Utils\callableToString($callable))) {
        return false;
    }
    $file = Utils\reflectCallable($callable)->getFileName();
    $evaluated = preg_match(EVALUATED_CODE_FILE_NAME_SUFFIX, $file);
    return $evaluated || !empty(State::$preprocessedFiles[$file]);
}
Ejemplo n.º 2
0
 function __construct($callback)
 {
     parent::__construct(sprintf($this->message, Utils\callableToString($callback)));
 }
Ejemplo n.º 3
0
function shouldWarnAbout($callable)
{
    $callable = Utils\callableToString($callable);
    foreach (State::$suppressedWarnings as $wildcard) {
        if (Utils\wildcardMatches($wildcard, $callable)) {
            return false;
        }
    }
    return true;
}