mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-01 04:57:23 +00:00
d58c8be15ddbda8532df7ba5de283b51dd8939d2
This PR was merged into the 3.x branch.
Discussion
----------
Add throw tag to parse methods
Hi `@fabpot`, with PHPStan improving every day his exception checking, it's useful to have well documented method.
I didn't update all of them (there are too many), and focus on the one I have issue with:
- Almost all the InfixExpressionParserInterface/PrefixExpressionParserInterface implements throws a SyntaxError in parse method
- Parser::parse method is catching SyntaxError and rethrowing them so it should be added to the phpdoc
- Since Parser::parse catch Parser::subparse, it would be useful to add the phpdoc to subparse
Commits
-------
790eee7ae0 Add throw tag to parse methods
…
Twig, the flexible, fast, and secure template language for PHP
==============================================================
Twig is a template language for PHP.
Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.
Sponsors
--------
.. raw:: html
<a href="https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
<img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
</a>
More Information
----------------
Read the `documentation`_ for more information.
.. _documentation: https://twig.symfony.com/documentation
Description
Languages
PHP
99.9%