Passed
Push — master ( 742ef2...7822c6 )
by Sebastian
04:11
created

ShowEncoded   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 7
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A translate() 0 5 1
1
<?php
2
/**
3
 * File containing the class {@see \Mailcode\Translator\Syntax\ApacheVelocity\ShowEncoded}.
4
 *
5
 * @package Mailcode
6
 * @subpackage Translator
7
 * @see \Mailcode\Translator\Syntax\ApacheVelocity\ShowEncoded
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode\Translator\Syntax\ApacheVelocity;
13
14
use Mailcode\Mailcode_Commands_Command_ShowEncoded;
15
use Mailcode\Mailcode_Translator_Syntax_ApacheVelocity;
16
use Mailcode\Translator\Command\ShowEncodedInterface;
17
18
/**
19
 * Translates the `showencoded` command to ApacheVelocity.
20
 *
21
 * @package Mailcode
22
 * @subpackage Translator
23
 * @author Sebastian Mordziol <[email protected]>
24
 */
25
class ShowEncoded extends Mailcode_Translator_Syntax_ApacheVelocity implements ShowEncodedInterface
26
{
27
    public function translate(Mailcode_Commands_Command_ShowEncoded $command) : string
28
    {
29
        $stringLiteral = $this->renderQuotedValue($command->getText());
30
31
        return $this->renderEncodings($command, $stringLiteral);
32
    }
33
}
34