Completed
Push — master ( 94bc98...2d9023 )
by Martin
09:18
created

TableExtension::getBlockRenderers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 10
cp 0
rs 9.9332
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\Extension\Extension;
18
19
class TableExtension extends Extension
20
{
21
    public function getBlockParsers(): array
22
    {
23
        return [
24
            new TableParser(),
25
        ];
26
    }
27
28
    public function getBlockRenderers(): array
29
    {
30
        return [
31
            __NAMESPACE__.'\\Table' => new TableRenderer(),
32
            __NAMESPACE__.'\\TableCaption' => new TableCaptionRenderer(),
33
            __NAMESPACE__.'\\TableRows' => new TableRowsRenderer(),
34
            __NAMESPACE__.'\\TableRow' => new TableRowRenderer(),
35
            __NAMESPACE__.'\\TableCell' => new TableCellRenderer(),
36
        ];
37
    }
38
39
    public function getName(): string
40
    {
41
        return 'table';
42
    }
43
}
44