mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 10:56:38 +00:00
revert 1.x merge
This commit is contained in:
+1
-1
@@ -454,7 +454,7 @@ class Environment
|
||||
* @throws LoaderError When the template cannot be found
|
||||
* @throws SyntaxError When an error occurred during compilation
|
||||
*/
|
||||
public function createTemplate($template, $name = null)
|
||||
public function createTemplate($template, string $name = null)
|
||||
{
|
||||
$hash = hash('sha256', $template, false);
|
||||
if (null !== $name) {
|
||||
|
||||
@@ -39,7 +39,7 @@ use Twig\Template;
|
||||
*
|
||||
* @return Template
|
||||
*/
|
||||
function twig_template_from_string(Environment $env, $template, $name = null)
|
||||
function twig_template_from_string(Environment $env, $template, string $name = null)
|
||||
{
|
||||
return $env->createTemplate((string) $template, $name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user