Failed Conditions
Push — psr2 ( de3699...36dc94 )
by Andreas
03:29
created

Header::connectTo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 1
dl 0
loc 9
c 0
b 0
f 0
cc 1
eloc 5
nop 1
rs 9.6666
1
<?php
2
3
namespace dokuwiki\ParserMode;
4
5
class Header extends AbstractMode
6
{
7
8
    /** @inheritdoc */
9
    public function connectTo($mode)
10
    {
11
        //we're not picky about the closing ones, two are enough
12
        $this->Lexer->addSpecialPattern(
13
            '[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)',
14
            $mode,
15
            'header'
16
        );
17
    }
18
19
    /** @inheritdoc */
20
    public function getSort()
21
    {
22
        return 50;
23
    }
24
}
25