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

Header   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 20
c 0
b 0
f 0
rs 10
wmc 2
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A connectTo() 0 9 1
A getSort() 0 4 1
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