MarkuaConverter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 14
ccs 7
cts 8
cp 0.875
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
/*
4
 * This file is part of the league/markua package.
5
 *
6
 * (c) Davey Shafik <[email protected]>
7
 * (c) Dan Hunsaker <[email protected]>
8
 *
9
 * Original code based on the CommonMark JS reference parser (http://bitly.com/commonmarkjs)
10
 *  - (c) John MacFarlane
11
 *
12
 * For the full copyright and license information, please view the LICENSE
13
 * file that was distributed with this source code.
14
 */
15
16
namespace Danhunsaker\Markua;
17
18
use League\CommonMark\CommonMarkConverter;
19
use League\CommonMark\DocParser;
20
use League\CommonMark\Environment;
21
use League\CommonMark\HtmlRenderer;
22
use Danhunsaker\Markua\Extension\MarkuaExtension;
23
24
/**
25
 * Converts Markua-compatible Markdown to HTML.
26
 */
27
class MarkuaConverter extends CommonMarkConverter
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32 30
    public function __construct(array $config = [], Environment $environment = null)
33
    {
34 30
        if ($environment === null) {
35 30
            $environment = Environment::createCommonMarkEnvironment();
36 30
        }
37 30
        $environment->addExtension(new MarkuaExtension());
38 30
        parent::__construct($config, $environment);
39 30
    }
40
}
41