Permalink
Browse files

[TwigBundle] fixed CS

  • Loading branch information...
eriksencosta committed Apr 7, 2012
1 parent 20a9961 commit f5f0506b1be2bd516da95c8403fbe74fd12c7978
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/Symfony/Bridge/Twig/Extension/FormExtension.php
@@ -216,9 +216,9 @@ public function renderLabel(FormView $view, $label = null, array $variables = ar
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 @@ protected function render(FormView $view, $section, array $variables = array())
$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 @@ protected function render(FormView $view, $section, array $variables = array())
$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 @@ public function getName()
protected function getBlocks(FormView $view)
{
if (!$this->blocks->contains($view)) {
-
$rootView = !$view->hasParent();
$templates = $rootView ? $this->resources : array();
@@ -346,6 +344,7 @@ protected function getBlocks(FormView $view)
if (!$template instanceof \Twig_Template) {
$template = $this->environment->loadTemplate($template);
}
+
$templateBlocks = array();
do {
$templateBlocks = array_merge($template->getBlocks(), $templateBlocks);

0 comments on commit f5f0506

Please sign in to comment.