revert 1.x merge

This commit is contained in:
Fabien Potencier
2019-04-11 12:09:41 +02:00
parent ebbac72097
commit 71a769afdf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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);
}