Passed
Branch symfony-console (1f7bcb)
by Kacper
03:39
created

PlainText   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 1 Features 0
Metric Value
c 3
b 1
f 0
dl 0
loc 22
rs 10
wmc 3
lcom 0
cbo 1

3 Methods

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