Code Duplication    Length = 15-17 lines in 2 locations

src/Core/ViewHelper/Traits/CompileWithContentArgumentAndRenderStatic.php 1 location

@@ 63-79 (lines=17) @@
60
     * @param TemplateCompiler $compiler
61
     * @return string
62
     */
63
    public function compile(
64
        $argumentsName,
65
        $closureName,
66
        &$initializationPhpCode,
67
        ViewHelperNode $node,
68
        TemplateCompiler $compiler
69
    ) {
70
        list ($initialization, $execution) = ViewHelperCompiler::getInstance()->compileWithCallToStaticMethod(
71
            $this,
72
            $argumentsName,
73
            $closureName,
74
            ViewHelperCompiler::RENDER_STATIC,
75
            static::class
76
        );
77
        $initializationPhpCode .= $initialization;
78
        return $execution;
79
    }
80
81
    /**
82
     * Helper which is mostly needed when calling renderStatic() from within

src/Core/ViewHelper/Traits/CompileWithRenderStatic.php 1 location

@@ 42-56 (lines=15) @@
39
     * @param TemplateCompiler $compiler
40
     * @return string
41
     */
42
    public function compile(
43
        $argumentsName,
44
        $closureName,
45
        &$initializationPhpCode,
46
        ViewHelperNode $node,
47
        TemplateCompiler $compiler
48
    ) {
49
        list ($initialization, $execution) = ViewHelperCompiler::getInstance()->compileWithCallToStaticMethod(
50
            $this,
51
            $argumentsName,
52
            $closureName
53
        );
54
        $initializationPhpCode .= $initialization;
55
        return $execution;
56
    }
57
}
58