Completed
Push — master ( 6f37d5...aba46f )
by Matej
8s
created

Events::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Velikonja\LabbyBundle;
4
5
final class Events
6
{
7
    const PRE_SYNC     = 'velikonja_labby.pre_sync';
8
    const POST_SYNC    = 'velikonja_labby.post_sync';
9
    const PRE_SYNC_FS  = 'velikonja_labby.pre_sync.fs';
10
    const POST_SYNC_FS = 'velikonja_labby.post_sync.fs';
11
    const PRE_SYNC_DB  = 'velikonja_labby.pre_sync.db';
12
    const POST_SYNC_DB = 'velikonja_labby.post_sync.db';
13
14
    /**
15
     * Private constructor. This class cannot be instantiated.
16
     */
17
    private function __construct()
18
    {
19
    }
20
21 15
    public static function all()
22
    {
23 15
        $reflection = new \ReflectionClass(get_class());
24 15
        $constants  = array();
25
26
        //search for all constants in this class that start with $prefix
27 15
        foreach ($reflection->getConstants() as $constName => $constValue) {
28 15
            $constants[$constName] = $constValue;
29
        }
30
31 15
        return $constants;
32
    }
33
}
34