GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

CommonMarkCoreExtension   C
last analyzed

Coupling/Cohesion

Components 0
Dependencies 39

Complexity

Total Complexity 5

Size/Duplication

Total Lines 86
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 39
dl 0
loc 86
ccs 48
cts 48
cp 1
rs 5
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getInlineProcessors() 0 6 1
A getBlockParsers() 0 15 1
A getInlineParsers() 0 15 1
A getBlockRenderers() 0 15 1
A getInlineRenderers() 0 13 1
1
<?php
2
3
/*
4
 * This file is part of the league/commonmark package.
5
 *
6
 * (c) Colin O'Dell <[email protected]>
7
 *
8
 * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
9
 *  - (c) John MacFarlane
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 League\CommonMark\Extension;
16
17
use League\CommonMark\Block\Parser as BlockParser;
18
use League\CommonMark\Block\Renderer as BlockRenderer;
19
use League\CommonMark\Inline\Parser as InlineParser;
20
use League\CommonMark\Inline\Processor as InlineProcessor;
21
use League\CommonMark\Inline\Renderer as InlineRenderer;
22
23
class CommonMarkCoreExtension extends Extension
24
{
25
    /**
26
     * @return BlockParser\BlockParserInterface[]
27
     */
28 1914
    public function getBlockParsers()
29
    {
30
        return [
31
            // This order is important
32 1914
            new BlockParser\BlockQuoteParser(),
33 1914
            new BlockParser\ATXHeadingParser(),
34 1914
            new BlockParser\FencedCodeParser(),
35 1914
            new BlockParser\HtmlBlockParser(),
36 1914
            new BlockParser\SetExtHeadingParser(),
37 1914
            new BlockParser\ThematicBreakParser(),
38 1914
            new BlockParser\ListParser(),
39 1914
            new BlockParser\IndentedCodeParser(),
40 1914
            new BlockParser\LazyParagraphParser(),
41 1914
        ];
42
    }
43
44
    /**
45
     * @return InlineParser\InlineParserInterface[]
46
     */
47 1914
    public function getInlineParsers()
48
    {
49
        return [
50 1914
            new InlineParser\NewlineParser(),
51 1914
            new InlineParser\BacktickParser(),
52 1914
            new InlineParser\EscapableParser(),
53 1914
            new InlineParser\EntityParser(),
54 1914
            new InlineParser\EmphasisParser(),
55 1914
            new InlineParser\AutolinkParser(),
56 1914
            new InlineParser\HtmlInlineParser(),
57 1914
            new InlineParser\CloseBracketParser(),
58 1914
            new InlineParser\OpenBracketParser(),
59 1914
            new InlineParser\BangParser(),
60 1914
        ];
61
    }
62
63
    /**
64
     * @return InlineProcessor\InlineProcessorInterface[]
65
     */
66 1914
    public function getInlineProcessors()
67
    {
68
        return [
69 1914
            new InlineProcessor\EmphasisProcessor(),
70 1914
        ];
71
    }
72
73
    /**
74
     * @return BlockRenderer\BlockRendererInterface[]
75
     */
76 1914
    public function getBlockRenderers()
77
    {
78
        return [
79 1914
            'League\CommonMark\Block\Element\BlockQuote'          => new BlockRenderer\BlockQuoteRenderer(),
80 1914
            'League\CommonMark\Block\Element\Document'            => new BlockRenderer\DocumentRenderer(),
81 1914
            'League\CommonMark\Block\Element\FencedCode'          => new BlockRenderer\FencedCodeRenderer(),
82 1914
            'League\CommonMark\Block\Element\Heading'             => new BlockRenderer\HeadingRenderer(),
83 1914
            'League\CommonMark\Block\Element\HtmlBlock'           => new BlockRenderer\HtmlBlockRenderer(),
84 1914
            'League\CommonMark\Block\Element\IndentedCode'        => new BlockRenderer\IndentedCodeRenderer(),
85 1914
            'League\CommonMark\Block\Element\ListBlock'           => new BlockRenderer\ListBlockRenderer(),
86 1914
            'League\CommonMark\Block\Element\ListItem'            => new BlockRenderer\ListItemRenderer(),
87 1914
            'League\CommonMark\Block\Element\Paragraph'           => new BlockRenderer\ParagraphRenderer(),
88 1914
            'League\CommonMark\Block\Element\ThematicBreak'       => new BlockRenderer\ThematicBreakRenderer(),
89 1914
        ];
90
    }
91
92
    /**
93
     * @return InlineRenderer\InlineRendererInterface[]
94
     */
95 1914
    public function getInlineRenderers()
96
    {
97
        return [
98 1914
            'League\CommonMark\Inline\Element\Code'       => new InlineRenderer\CodeRenderer(),
99 1914
            'League\CommonMark\Inline\Element\Emphasis'   => new InlineRenderer\EmphasisRenderer(),
100 1914
            'League\CommonMark\Inline\Element\HtmlInline' => new InlineRenderer\HtmlInlineRenderer(),
101 1914
            'League\CommonMark\Inline\Element\Image'      => new InlineRenderer\ImageRenderer(),
102 1914
            'League\CommonMark\Inline\Element\Link'       => new InlineRenderer\LinkRenderer(),
103 1914
            'League\CommonMark\Inline\Element\Newline'    => new InlineRenderer\NewlineRenderer(),
104 1914
            'League\CommonMark\Inline\Element\Strong'     => new InlineRenderer\StrongRenderer(),
105 1914
            'League\CommonMark\Inline\Element\Text'       => new InlineRenderer\TextRenderer(),
106 1914
        ];
107
    }
108
}
109