Passed
Push — master ( 69774c...de7969 )
by Sebastian
02:46
created

Base   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
c 0
b 0
f 0
dl 0
loc 22
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHint() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of CaptainHook
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Hook\Message\Rule;
13
14
use SebastianFeldmann\Git\CommitMessage;
15
use CaptainHook\App\Hook\Message\Rule;
16
17
/**
18
 * Class Base
19
 *
20
 * @package CaptainHook
21
 * @author  Sebastian Feldmann <[email protected]>
22
 * @link    https://github.com/captainhookphp/captainhook
23
 * @since   Class available since Release 0.9.0
24
 */
25
abstract class Base implements Rule
26
{
27
    /**
28
     * Rule hint.
29
     *
30
     * @var string
31
     */
32
    protected $hint;
33
34
    /**
35 5
     * @return string
36
     */
37 5
    public function getHint(): string
38
    {
39
        return $this->hint;
40
    }
41
42
    /**
43
     * @param  \SebastianFeldmann\Git\CommitMessage $msg
44
     * @return bool
45
     */
46
    abstract public function pass(CommitMessage $msg): bool;
47
}
48