mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 03:16:34 +00:00
minor #2557 add throws tags doc block for Twig_Environment:load (Haehnchen)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2557).
Discussion
----------
add throws tags doc block for Twig_Environment:load
On an internal project review we noticed that `\Twig_Environment::load` is not providing throw tags. As this method is just a proxy for `\Twig_Environment::loadTemplate` which itself is _internal_ we had some discussion around.
this PR provides same throw tags as _loadTemplate_. Maybe this helps to understand code usage
Commits
-------
882c7aab add throws tags doc block for Twig_Environment:load
This commit is contained in:
@@ -383,6 +383,10 @@ class Twig_Environment
|
||||
*
|
||||
* @param string|Twig_TemplateWrapper|Twig_Template $name The template name
|
||||
*
|
||||
* @throws Twig_Error_Loader When the template cannot be found
|
||||
* @throws Twig_Error_Runtime When a previously generated cache is corrupted
|
||||
* @throws Twig_Error_Syntax When an error occurred during compilation
|
||||
*
|
||||
* @return Twig_TemplateWrapper
|
||||
*/
|
||||
public function load($name)
|
||||
|
||||
Reference in New Issue
Block a user