Browse code

revert 1.x merge

Fabien Potencier authored on 11/04/2019 10:09:41
Showing 2 changed files
... ...
@@ -454,7 +454,7 @@ class Environment
454 454
      * @throws LoaderError When the template cannot be found
455 455
      * @throws SyntaxError When an error occurred during compilation
456 456
      */
457
-    public function createTemplate($template, $name = null)
457
+    public function createTemplate($template, string $name = null)
458 458
     {
459 459
         $hash = hash('sha256', $template, false);
460 460
         if (null !== $name) {
... ...
@@ -39,7 +39,7 @@ use Twig\Template;
39 39
  *
40 40
  * @return Template
41 41
  */
42
-function twig_template_from_string(Environment $env, $template, $name = null)
42
+function twig_template_from_string(Environment $env, $template, string $name = null)
43 43
 {
44 44
     return $env->createTemplate((string) $template, $name);
45 45
 }