Completed
Push — master ( dc2700...65f918 )
by Martin
22:42 queued 16:21
created

TableExtension::getBlockParsers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This is part of the webuni/commonmark-table-extension package.
5
 *
6
 * (c) Martin Hasoň <[email protected]>
7
 * (c) Webuni s.r.o. <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Webuni\CommonMark\TableExtension;
14
15
use League\CommonMark\Extension\Extension;
16
17
class TableExtension extends Extension
18
{
19 16
    public function getBlockParsers()
20
    {
21
        return [
22 16
            new TableParser(),
23
        ];
24
    }
25
26 16
    public function getBlockRenderers()
27
    {
28
        return [
29 16
            __NAMESPACE__.'\\Table' => new TableRenderer(),
30 16
            __NAMESPACE__.'\\TableCaption' => new TableCaptionRenderer(),
31 16
            __NAMESPACE__.'\\TableRows' => new TableRowsRenderer(),
32 16
            __NAMESPACE__.'\\TableRow' => new TableRowRenderer(),
33 16
            __NAMESPACE__.'\\TableCell' => new TableCellRenderer(),
34
        ];
35
    }
36
37
    public function getName()
38
    {
39
        return 'table';
40
    }
41
}
42