GithubFlavoredMarkdownConverter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 2
b 0
f 0
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the league/commonmark package.
7
 *
8
 * (c) Colin O'Dell <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace League\CommonMark;
15
16
use League\CommonMark\Environment\Environment;
17
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
18
use League\CommonMark\Extension\GithubFlavoredMarkdownExtension;
19
20
/**
21
 * Converts GitHub Flavored Markdown to HTML.
22
 */
23
final class GithubFlavoredMarkdownConverter extends MarkdownConverter
24
{
25
    /**
26
     * Create a new Markdown converter pre-configured for GFM
27
     *
28
     * @param array<string, mixed> $config
29
     */
30 81
    public function __construct(array $config = [])
31
    {
32 81
        $environment = new Environment($config);
33 81
        $environment->addExtension(new CommonMarkCoreExtension());
34 81
        $environment->addExtension(new GithubFlavoredMarkdownExtension());
35
36 81
        parent::__construct($environment);
37 81
    }
38
}
39