Passed
Branch master (f3f280)
by Maciej
03:18
created

PlainText   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 21
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMetadata() 0 5 1
A setupRules() 0 2 1
A getIdentifier() 0 3 1
1
<?php
2
3
/**
4
 * Highlighter
5
 *
6
 * Copyright (C) 2016, Some right reserved.
7
 *
8
 * @author Kacper "Kadet" Donat <[email protected]>
9
 *
10
 * Contact with author:
11
 * Xmpp: [email protected]
12
 * E-mail: [email protected]
13
 *
14
 * From Kadet with love.
15
 */
16
17
namespace Kadet\Highlighter\Language;
18
19
class PlainText extends GreedyLanguage
20
{
21
22
    /**
23
     * Tokenization rules
24
     */
25 1
    public function setupRules()
26
    {
27 1
    }
28
29
    /** {@inheritdoc} */
30 1
    public function getIdentifier()
31
    {
32 1
        return 'plaintext';
33
    }
34
35
    public static function getMetadata()
36
    {
37
        return [
38
            'name'      => ['plaintext', 'text', 'none'],
39
            'mime'      => ['text/plain']
40
        ];
41
    }
42
}
43