Completed
Push — master ( 4e66b4...07b1de )
by Billie
05:44
created

SeparateSubjectFromBodyWithABlankLineStatus::getState()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace PurpleBooth\GitLintValidators\Status;
6
7
use PurpleBooth\GitLintValidators\Validator\SeparateSubjectFromBodyWithABlankLineValidator;
8
9
/**
10
 * This is the status returned when the SeparateSubjectFromBodyWithABlankLineValidator identifies a problem
11
 *
12
 * @see     SeparateSubjectFromBodyWithABlankLineValidator
13
 *
14
 * @package PurpleBooth\GitLintValidators\Status
15
 */
16
class SeparateSubjectFromBodyWithABlankLineStatus implements Status
17
{
18
    /**
19
     * Get the importance of this status.
20
     *
21
     * The lower the value the less important it is, the higher the more important.
22
     *
23
     * @return int
24
     */
25
    public function getWeight() : int
26
    {
27
        return Status::WEIGHT_ERROR;
28
    }
29
30
    /**
31
     * A human readable message that describes this state
32
     *
33
     * This will be displayed to the user via the GitHub state
34
     *
35
     * @return string
36
     */
37
    public function getMessage() : string
38
    {
39
        return 'Please put a single blank line between the subject and body of the commit message';
40
    }
41
42
    /**
43
     * Is true if the status is one that should not be taken as indicative of a incorrectly formatted message
44
     *
45
     * @return boolean
46
     */
47
    public function isPositive() : bool
48
    {
49
        return false;
50
    }
51
52
    /**
53
     * Get a URL with further explanation about this commit message status
54
     *
55
     * @return string
56
     */
57
    public function getDetailsUrl() : string
58
    {
59
        return "http://chris.beams.io/posts/git-commit/#separate";
60
    }
61
}
62