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

TwigMarkdownEngine   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A transform() 0 4 1
A getName() 0 4 1
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
}