Completed
Pull Request — master (#13)
by Andreas
02:11
created

Hooks   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValidHooks() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Copyright Andrea Heigl <[email protected]>
7
 *
8
 * Licenses under the MIT-license. For details see the included file LICENSE.md
9
 */
10
11
namespace CaptainHook\App;
12
13
14
final class Hooks
15
{
16
    const PRE_COMMIT = 'pre-commit';
17
18
    const PRE_PUSH = 'pre-push';
19
20
    const COMMIT_MSG = 'commit-msg';
21
22
    const PREPARE_COMMIT_MSG = 'prepare-commit-msg';
23
24 56
    public static function getValidHooks() : array
25
    {
26
        return [
27 56
            self::COMMIT_MSG => 1,
28 56
            self::PRE_PUSH   => 1,
29 56
            self::PRE_COMMIT => 1,
30 56
            self::PREPARE_COMMIT_MSG => 1,
31
        ];
32
    }
33
}