Completed
Pull Request — master (#23)
by
unknown
08:04
created

TableExtension::getBlockParsers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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) {
23
        $environment
24
            ->addBlockParser(new TableParser())
25
26
            ->addBlockRenderer(Table::class, new TableRenderer())
27
            ->addBlockRenderer(TableCaption::class, new TableCaptionRenderer())
28
            ->addBlockRenderer(TableRows::class, new TableRowsRenderer())
29
            ->addBlockRenderer(TableRow::class, new TableRowRenderer())
30
            ->addBlockRenderer(TableCell::class, new TableCellRenderer());
31
32
    }
33
}
34