Mailcode_Commands_Keywords   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 6
Bugs 0 Features 0
Metric Value
wmc 1
eloc 28
c 6
b 0
f 0
dl 0
loc 35
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAll() 0 16 1
1
<?php
2
/**
3
 * File containing the class {@see Mailcode_Commands_Keywords}.
4
 *
5
 * @package Mailcode
6
 * @subpackage Commands
7
 * @see Mailcode_Commands_Keywords
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode;
13
14
/**
15
 * Enum of all available keyword types that can be used
16
 * in commands.
17
 *
18
 * @package Mailcode
19
 * @subpackage Commands
20
 * @author Sebastian Mordziol <[email protected]>
21
 */
22
class Mailcode_Commands_Keywords
23
{
24
    public const TYPE_IN = 'in:';
25
    public const TYPE_INSENSITIVE = 'insensitive:';
26
    public const TYPE_REGEX = 'regex:';
27
    public const TYPE_URLENCODE = 'urlencode:';
28
    public const TYPE_URLDECODE = 'urldecode:';
29
    public const TYPE_MULTILINE = 'multiline:';
30
    public const TYPE_IDN_ENCODE = 'idnencode:';
31
    public const TYPE_IDN_DECODE = 'idndecode:';
32
    public const TYPE_NOHTML = 'nohtml:';
33
    public const TYPE_ABSOLUTE = 'absolute:';
34
    public const TYPE_NO_TRACKING = 'no-tracking:';
35
    public const TYPE_CURRENCY_NAME = 'currency-name:';
36
    public const TYPE_SHORTEN = 'shorten:';
37
38
    /**
39
     * @return string[]
40
     */
41
    public static function getAll(): array
42
    {
43
        return array(
44
            self::TYPE_IN,
45
            self::TYPE_INSENSITIVE,
46
            self::TYPE_REGEX,
47
            self::TYPE_URLENCODE,
48
            self::TYPE_URLDECODE,
49
            self::TYPE_MULTILINE,
50
            self::TYPE_IDN_ENCODE,
51
            self::TYPE_IDN_DECODE,
52
            self::TYPE_NOHTML,
53
            self::TYPE_ABSOLUTE,
54
            self::TYPE_NO_TRACKING,
55
            self::TYPE_CURRENCY_NAME,
56
            self::TYPE_SHORTEN
57
        );
58
    }
59
}
60