diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine index 5ef2f10493c020d1776461f989689963d231bfb1..240118ac6c9bec238ac17ad840c0f2ac90562229 100644 --- a/core/themes/engines/twig/twig.engine +++ b/core/themes/engines/twig/twig.engine @@ -40,15 +40,15 @@ function twig_init(Extension $theme) { * If the Twig debug setting is enabled, HTML comments including _theme() call * and template file name suggestions will surround the template markup. * - * @param $template_file + * @param string $template_file * The file name of the template to render. - * @param $variables + * @param array $variables * A keyed array of variables that will appear in the output. * * @return string * The output generated by the template, plus any debug information. */ -function twig_render_template($template_file, $variables) { +function twig_render_template($template_file, array $variables) { /** @var \Twig_Environment $twig_service */ $twig_service = \Drupal::service('twig'); try { @@ -118,9 +118,9 @@ function twig_render_template($template_file, $variables) { * returned directly. * * @param mixed $arg - * String, Object or Render Array + * String, Object or Render Array. * - * @return + * @return mixed * The rendered output or an Twig_Markup object. * * @see render @@ -167,7 +167,7 @@ function twig_render_var($arg) { * elements. The original renderable array is still available and can be used * to print child elements in their entirety in the twig template. * - * @param array $element + * @param array|object $element * The parent renderable array to exclude the child items. * @param string[] $args, ... * The string keys of $element to prevent printing. @@ -197,14 +197,14 @@ function twig_without($element) { * * Replacement function for Twig's escape filter. * - * @param Twig_Environment $env + * @param \Twig_Environment $env * A Twig_Environment instance. * @param string $string * The value to be escaped. * @param string $strategy * The escaping strategy. Defaults to 'html'. * @param string $charset - * The charset. + * The charset. * @param bool $autoescape * Whether the function is called by the auto-escaping feature (TRUE) or by * the developer (FALSE).