From f5f0506b1be2bd516da95c8403fbe74fd12c7978 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Date: Sat, 7 Apr 2012 01:24:57 -0300 Subject: [PATCH] [TwigBundle] fixed CS --- src/Symfony/Bridge/Twig/Extension/FormExtension.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Extension/FormExtension.php b/src/Symfony/Bridge/Twig/Extension/FormExtension.php index bee2eb8cc8..ef208ac7eb 100644 --- a/src/Symfony/Bridge/Twig/Extension/FormExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/FormExtension.php @@ -216,9 +216,9 @@ class FormExtension extends \Twig_Extension protected function render(FormView $view, $section, array $variables = array()) { $mainTemplate = in_array($section, array('widget', 'row')); - if ($mainTemplate && $view->isRendered()) { - return ''; + if ($mainTemplate && $view->isRendered()) { + return ''; } if (null === $this->template) { @@ -240,7 +240,7 @@ class FormExtension extends \Twig_Extension $types = $view->get('types'); $types[] = $custom; $typeIndex = count($types) - 1; - $this->varStack[$rendering] = array ( + $this->varStack[$rendering] = array( 'variables' => array_replace_recursive($view->all(), $variables), 'types' => $types, ); @@ -250,7 +250,6 @@ class FormExtension extends \Twig_Extension $types[$typeIndex] .= '_'.$section; if (isset($blocks[$types[$typeIndex]])) { - $this->varStack[$rendering]['typeIndex'] = $typeIndex; // we do not call renderBlock here to avoid too many nested level calls (XDebug limits the level to 100 by default) @@ -331,7 +330,6 @@ class FormExtension extends \Twig_Extension protected function getBlocks(FormView $view) { if (!$this->blocks->contains($view)) { - $rootView = !$view->hasParent(); $templates = $rootView ? $this->resources : array(); @@ -346,6 +344,7 @@ class FormExtension extends \Twig_Extension if (!$template instanceof \Twig_Template) { $template = $this->environment->loadTemplate($template); } + $templateBlocks = array(); do { $templateBlocks = array_merge($template->getBlocks(), $templateBlocks);