TableExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 6
dl 0
loc 15
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This is part of the webuni/commonmark-table-extension package.
7
 *
8
 * (c) Martin Hasoň <[email protected]>
9
 * (c) Webuni s.r.o. <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Webuni\CommonMark\TableExtension;
16
17
use League\CommonMark\ConfigurableEnvironmentInterface;
18
use League\CommonMark\Extension\ExtensionInterface;
19
20
final class TableExtension implements ExtensionInterface
21
{
22
    public function register(ConfigurableEnvironmentInterface $environment): void
23
    {
24
        $environment
25
            ->addBlockParser(new TableParser())
26
27
            ->addBlockRenderer(Table::class, new TableRenderer())
28
            ->addBlockRenderer(TableCaption::class, new TableCaptionRenderer())
29
            ->addBlockRenderer(TableRows::class, new TableRowsRenderer())
30
            ->addBlockRenderer(TableRow::class, new TableRowRenderer())
31
            ->addBlockRenderer(TableCell::class, new TableCellRenderer())
32
        ;
33
    }
34
}
35