Code Duplication    Length = 8-9 lines in 2 locations

src/View/AbstractTemplateView.php 2 locations

@@ 250-258 (lines=9) @@
247
248
        if ($parsedTemplate->isCompiled()) {
249
            $methodNameOfSection = 'section_' . sha1($sectionName);
250
            if (!method_exists($parsedTemplate, $methodNameOfSection)) {
251
                if ($ignoreUnknown) {
252
                    return '';
253
                } else {
254
                    return $renderingContext->getErrorHandler()->handleViewError(
255
                        new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
256
                    );
257
                }
258
            }
259
            $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
260
            $output = $parsedTemplate->$methodNameOfSection($renderingContext);
261
            $this->stopRendering();
@@ 264-271 (lines=8) @@
261
            $this->stopRendering();
262
        } else {
263
            $sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections');
264
            if (!isset($sections[$sectionName])) {
265
                if ($ignoreUnknown) {
266
                    return '';
267
                }
268
                return $renderingContext->getErrorHandler()->handleViewError(
269
                    new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
270
                );
271
            }
272
            /** @var $section ViewHelperNode */
273
            $section = $sections[$sectionName];
274