Code Duplication    Length = 8-9 lines in 2 locations

src/View/AbstractTemplateView.php 2 locations

@@ 240-248 (lines=9) @@
237
238
        if ($parsedTemplate->isCompiled()) {
239
            $methodNameOfSection = 'section_' . sha1($sectionName);
240
            if (!method_exists($parsedTemplate, $methodNameOfSection)) {
241
                if ($ignoreUnknown) {
242
                    return '';
243
                } else {
244
                    return $renderingContext->getErrorHandler()->handleViewError(
245
                        new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
246
                    );
247
                }
248
            }
249
            $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
250
            $output = $parsedTemplate->$methodNameOfSection($renderingContext);
251
            $this->stopRendering();
@@ 254-261 (lines=8) @@
251
            $this->stopRendering();
252
        } else {
253
            $sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections');
254
            if (!isset($sections[$sectionName])) {
255
                if ($ignoreUnknown) {
256
                    return '';
257
                }
258
                return $renderingContext->getErrorHandler()->handleViewError(
259
                    new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
260
                );
261
            }
262
            /** @var $section ViewHelperNode */
263
            $section = $sections[$sectionName];
264