protected function addError(Error $error) { $this->errors->add($error); }
/** * Get the checker's errors. * * @return Error[] */ public function getErrors() { return $this->errors->getAll(); }
private function addNotEnoughParamsError(MethodCall $node, ReflectionClass $reflClass, $requiredParams) { $numArgs = count($node->args); $msg = "Method {$reflClass->getName()}::{$node->name}() requires {$requiredParams} arguments, {$numArgs} given"; $this->errors->add(new Error($msg, $node)); }
private function addError(Error $error) { if ($this->errors) { $this->errors->add($error); } }