MessageDefaults   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 44
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A allKeys() 0 10 2
1
<?php
2
3
namespace ElfSundae\BearyChat;
4
5
use ReflectionClass;
6
7
final class MessageDefaults
8
{
9
    /**
10
     * The default channel will be sent to.
11
     */
12
    const CHANNEL = 'channel';
13
14
    /**
15
     * The default user will be sent to.
16
     */
17
    const USER = 'user';
18
19
    /**
20
     * Indicates the text field should be parsed as markdown syntax.
21
     * Default is true.
22
     */
23
    const MARKDOWN = 'markdown';
24
25
    /**
26
     * The default notification will be display.
27
     */
28
    const NOTIFICATION = 'notification';
29
30
    /**
31
     * The default color for the attachments left separator.
32
     */
33
    const ATTACHMENT_COLOR = 'attachment_color';
34
35
    /**
36
     * Get the all possible keys.
37
     *
38
     * @return string[]
39
     */
40 8
    public static function allKeys()
41
    {
42 8
        static $allKeys = null;
43
44 8
        if (is_null($allKeys)) {
45 1
            $allKeys = array_values((new ReflectionClass(get_called_class()))->getConstants());
46
        }
47
48 8
        return $allKeys;
49
    }
50
}
51