Completed
Push — master ( 408d1e...675fac )
by Vladimir
02:25
created

TwigMarkdownEngine::transform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace allejo\stakx\Engines\Markdown;
4
5
use Aptoma\Twig\Extension\MarkdownEngineInterface;
6
7
class TwigMarkdownEngine implements MarkdownEngineInterface
8
{
9
    protected $engine;
10
11
    public function __construct ($instanceName = null)
12
    {
13
        $this->engine = MarkdownEngine::instance($instanceName);
14
    }
15
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function transform ($content)
20
    {
21
        return $this->engine->parse($content);
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function getName ()
28
    {
29
        return 'stakx/parsedown';
30
    }
31
}