@@ -323,10 +323,6 @@ public function getTemplateClass(string $name, ?int $index = null): string
323323 * Renders a template.
324324 *
325325 * @param string|TemplateWrapper $name The template name
326- *
327- * @throws LoaderError When the template cannot be found
328- * @throws SyntaxError When an error occurred during compilation
329- * @throws RuntimeError When an error occurred during rendering
330326 */
331327 public function render ($ name , array $ context = []): string
332328 {
@@ -337,10 +333,6 @@ public function render($name, array $context = []): string
337333 * Displays a template.
338334 *
339335 * @param string|TemplateWrapper $name The template name
340- *
341- * @throws LoaderError When the template cannot be found
342- * @throws SyntaxError When an error occurred during compilation
343- * @throws RuntimeError When an error occurred during rendering
344336 */
345337 public function display ($ name , array $ context = []): void
346338 {
@@ -351,10 +343,6 @@ public function display($name, array $context = []): void
351343 * Loads a template.
352344 *
353345 * @param string|TemplateWrapper $name The template name
354- *
355- * @throws LoaderError When the template cannot be found
356- * @throws RuntimeError When a previously generated cache is corrupted
357- * @throws SyntaxError When an error occurred during compilation
358346 */
359347 public function load ($ name ): TemplateWrapper
360348 {
@@ -379,9 +367,7 @@ public function load($name): TemplateWrapper
379367 * @param string $name The template name
380368 * @param int|null $index The index if it is an embedded template
381369 *
382- * @throws LoaderError When the template cannot be found
383370 * @throws RuntimeError When a previously generated cache is corrupted
384- * @throws SyntaxError When an error occurred during compilation
385371 *
386372 * @internal
387373 */
@@ -438,9 +424,6 @@ public function loadTemplate(string $cls, string $name, ?int $index = null): Tem
438424 *
439425 * @param string $template The template source
440426 * @param string|null $name An optional name of the template to be used in error messages
441- *
442- * @throws LoaderError When the template cannot be found
443- * @throws SyntaxError When an error occurred during compilation
444427 */
445428 public function createTemplate (string $ template , ?string $ name = null ): TemplateWrapper
446429 {
@@ -487,7 +470,6 @@ public function isTemplateFresh(string $name, int $time): bool
487470 * @param string|TemplateWrapper|array<string|TemplateWrapper> $names A template or an array of templates to try consecutively
488471 *
489472 * @throws LoaderError When none of the templates can be found
490- * @throws SyntaxError When an error occurred during compilation
491473 */
492474 public function resolveTemplate ($ names ): TemplateWrapper
493475 {
@@ -524,9 +506,6 @@ public function setLexer(Lexer $lexer)
524506 $ this ->lexer = $ lexer ;
525507 }
526508
527- /**
528- * @throws SyntaxError When the code is syntactically wrong
529- */
530509 public function tokenize (Source $ source ): TokenStream
531510 {
532511 if (null === $ this ->lexer ) {
@@ -546,8 +525,6 @@ public function setParser(Parser $parser)
546525
547526 /**
548527 * Converts a token stream to a node tree.
549- *
550- * @throws SyntaxError When the token stream is syntactically or semantically wrong
551528 */
552529 public function parse (TokenStream $ stream ): ModuleNode
553530 {
0 commit comments