Passed
Push — latest ( b70f10...da8ccb )
by Colin
24:45 queued 22:45
created

GithubFlavoredMarkdownConverter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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