Skip to content

Commit 0a585b7

Browse files
committed
merged branch eriksencosta/cs-fixes (PR #3816)
Commits ------- abd59c3 Merge branch 'master' into cs-fixes f5f0506 [TwigBundle] fixed CS Discussion ---------- CS fixes
2 parents d967d39 + abd59c3 commit 0a585b7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Symfony/Bridge/Twig/Extension/FormExtension.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ public function renderLabel(FormView $view, $label = null, array $variables = ar
216216
protected function render(FormView $view, $section, array $variables = array())
217217
{
218218
$mainTemplate = in_array($section, array('widget', 'row'));
219-
if ($mainTemplate && $view->isRendered()) {
220219

221-
return '';
220+
if ($mainTemplate && $view->isRendered()) {
221+
return '';
222222
}
223223

224224
if (null === $this->template) {
@@ -240,7 +240,7 @@ protected function render(FormView $view, $section, array $variables = array())
240240
$types = $view->get('types');
241241
$types[] = $custom;
242242
$typeIndex = count($types) - 1;
243-
$this->varStack[$rendering] = array (
243+
$this->varStack[$rendering] = array(
244244
'variables' => array_replace_recursive($view->all(), $variables),
245245
'types' => $types,
246246
);
@@ -250,7 +250,6 @@ protected function render(FormView $view, $section, array $variables = array())
250250
$types[$typeIndex] .= '_'.$section;
251251

252252
if (isset($blocks[$types[$typeIndex]])) {
253-
254253
$this->varStack[$rendering]['typeIndex'] = $typeIndex;
255254

256255
// 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()
331330
protected function getBlocks(FormView $view)
332331
{
333332
if (!$this->blocks->contains($view)) {
334-
335333
$rootView = !$view->hasParent();
336334

337335
$templates = $rootView ? $this->resources : array();
@@ -346,6 +344,7 @@ protected function getBlocks(FormView $view)
346344
if (!$template instanceof \Twig_Template) {
347345
$template = $this->environment->loadTemplate($template);
348346
}
347+
349348
$templateBlocks = array();
350349
do {
351350
$templateBlocks = array_merge($template->getBlocks(), $templateBlocks);

0 commit comments

Comments
 (0)