From e5d8a95a1b5354abbf06b26a4db75cee91f9de9a Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Thu, 5 Feb 2015 09:24:24 +0000
Subject: [PATCH] Issue #2418179 by martin107: twig.engine needs some
 documentation fixes

---
 core/themes/engines/twig/twig.engine | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index 5ef2f10493c0..240118ac6c9b 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).
-- 
GitLab