/** * Error creation factory. * * @param string $msg * @param Stmt $stmt * * @return FatalErrorException */ protected function createError($msg, $stmt) { return new FatalErrorException($msg, 0, 1, null, $stmt->getLine()); }
protected function addClassOrInterface(StmtNode $node) { $class = new ClassReflection((string) $node->namespacedName, $node->getLine()); $class->setModifiers($node->getType()); $class->setNamespace($this->context->getNamespace()); $class->setAliases($this->context->getAliases()); $class->setHash($this->context->getHash()); $class->setFile($this->context->getFile()); $comment = $this->context->getDocBlockParser()->parse($node->getDocComment(), $this->context, $class); $class->setDocComment($node->getDocComment()); $class->setShortDesc($comment->getShortDesc()); $class->setLongDesc($comment->getLongDesc()); if ($errors = $comment->getErrors()) { $class->setErrors($errors); } else { $class->setTags($comment->getOtherTags()); } if ($this->context->getFilter()->acceptClass($class)) { if ($errors) { $this->context->addErrors((string) $class, $node->getLine(), $errors); } $this->context->enterClass($class); } return $class; }
/** * Returns the line number where this object starts. * * @return int */ public function getLinenumber() { return $this->node->getLine(); }
protected function runEchoStatementCheck(Stmt $exp, TaintEnvironment $taintEnv) { $expTaints = $this->getExpressionsTaintValuesForAnalysis($exp->exprs, $taintEnv); $this->sinkNodes[$exp->getLine()] = new FunctionSinkNode($exp, $expTaints); }