ExternalLinkExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 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\Extension\ExternalLink;
15
16
use League\CommonMark\Environment\ConfigurableEnvironmentInterface;
17
use League\CommonMark\Event\DocumentParsedEvent;
18
use League\CommonMark\Extension\ExtensionInterface;
19
20
final class ExternalLinkExtension implements ExtensionInterface
21
{
22 201
    public function register(ConfigurableEnvironmentInterface $environment): void
23
    {
24 201
        $environment->addEventListener(DocumentParsedEvent::class, new ExternalLinkProcessor($environment));
25 201
    }
26
}
27