From baa7e5ef84bc32679da10c4cc308d0a8dfb68649 Mon Sep 17 00:00:00 2001 From: Chi Date: Sun, 28 May 2017 20:02:22 +0500 Subject: [PATCH] Issue #2880398 by mChadwick29: Code cleanup. --- src/TwigExtension.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TwigExtension.php b/src/TwigExtension.php index 2ecc586..62f25ce 100644 --- a/src/TwigExtension.php +++ b/src/TwigExtension.php @@ -222,16 +222,16 @@ class TwigExtension extends \Twig_Extension { * * @param string $form_id * The form ID. + * @param ... + * Additional arguments are passed to form constructor. * * @return array * A render array to represent the form. */ public function drupalForm($form_id) { + $form_builder = \Drupal::formBuilder(); $args = func_get_args(); - // Enforcing the $form_id is always the first argument. - $args[0] = $form_id; - $formBuilder = \Drupal::formBuilder(); - return call_user_func_array(array($formBuilder, 'getForm'), $args); + return call_user_func_array([$form_builder, 'getForm'], $args); } /**