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

Hooks::getValidHooks()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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
}