Passed
Push — master ( c28222...9253d7 )
by Sebastian
02:41
created

translate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
/**
3
 * File containing the {@see Mailcode_Translator_Syntax_ApacheVelocity_For} class.
4
 *
5
 * @package Mailcode
6
 * @subpackage Translator
7
 * @see Mailcode_Translator_Syntax_ApacheVelocity_For
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode;
13
14
/**
15
 * Translates the "For" command to Apache Velocity.
16
 *
17
 * @package Mailcode
18
 * @subpackage Translator
19
 * @author Sebastian Mordziol <[email protected]>
20
 */
21
class Mailcode_Translator_Syntax_ApacheVelocity_Code extends Mailcode_Translator_Syntax_ApacheVelocity implements Mailcode_Translator_Command_Code
22
{
23
    public function translate(Mailcode_Commands_Command_Code $command): string
24
    {
25
        $syntax = $command->getSyntaxName();
26
27
        return <<<EOD
28
#**
29
 Wrapper IF for the code command to insert native $syntax commands.
30
 This is needed for technical Mailcode reasons. 
31
*#
32
#if(true)
33
EOD;
34
    }
35
}
36