Passed
Push — issue-68 ( e286f9 )
by Fèvre
06:22
created

GithubCommitExtension::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
namespace Xetaravel\Markdown\GithubCommit;
3
4
use League\CommonMark\Environment\EnvironmentBuilderInterface;
5
use League\CommonMark\Extension\ExtensionInterface;
6
7
final class GithubCommitExtension implements ExtensionInterface
8
{
9
    public function register(EnvironmentBuilderInterface $environment): void
10
    {
11
        $environment
12
            ->addInlineParser(new GithubCommitParser())
13
            ->addRenderer(GithubCommit::class, new GithubCommitRenderer());
14
    }
15
}
16