Completed
Pull Request — master (#214)
by Claus
03:52
created

CompileEmpty::compile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 5
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
namespace TYPO3Fluid\Fluid\Core\ViewHelper\Traits;
3
4
5
use TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler;
6
use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode;
7
8
/**
9
 * Class CompileEmpty
10
 *
11
 * Implemented by ViewHelpers which must compile to provide empty
12
 * content (e.g. ViewHelper is a structure ViewHelper which uses
13
 * postParseEvent and/or are not supposed to render once compiled).
14
 */
15
trait CompileEmpty
16
{
17
    /**
18
     * Return empty string to be placed in the compiled template.
19
     *
20
     * @param string $argumentsName
21
     * @param string $closureName
22
     * @param string $initializationPhpCode
23
     * @param ViewHelperNode $node
24
     * @param TemplateCompiler $compiler
25
     * @return string
26
     */
27
    public function compile(
28
        $argumentsName,
0 ignored issues
show
Unused Code introduced by
The parameter $argumentsName is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
        $closureName,
0 ignored issues
show
Unused Code introduced by
The parameter $closureName is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
        &$initializationPhpCode,
0 ignored issues
show
Unused Code introduced by
The parameter $initializationPhpCode is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
        ViewHelperNode $node,
0 ignored issues
show
Unused Code introduced by
The parameter $node is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
32
        TemplateCompiler $compiler
0 ignored issues
show
Unused Code introduced by
The parameter $compiler is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
33
    ) {
34
        return '\'\'';
35
    }
36
}
37