/** * InvalidFunctionException constructor. * * @param string $name */ public function __construct($name) { parent::__construct(sprintf('Annotation function "%s" is undefined.', $name)); }
public function __construct($method) { parent::__construct("Annotator method `{$method}` does not allow wildcards in annotation name."); }
/** * Generates a new syntax error. * * @param string $expected Expected string. * @param array $token Optional token. * @throws AnnotationException */ private function syntaxError($expected, $token = null) { if ($token === null) { $token = $this->_lexer->lookahead; } $message = "Expected {$expected}, got "; if ($this->_lexer->lookahead === null) { $message .= 'end of string'; } else { $message .= "'{$token['value']}' at position {$token['position']}"; } if (strlen($this->_context)) { $message .= ' in ' . $this->_context; } $message .= '.'; throw AnnotationException::syntaxError($message); }
public function __construct($annotation) { parent::__construct("The `{$annotation}` annotation was used wrong. Please check the arguments."); }