Cancelled
Push — master ( a8b464...2fc3a5 )
by Billie
06:55
created

CapitalizeTheSubjectLineStatus::getWeight()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace PurpleBooth\GitGitHubLint\Status;
6
7
use PurpleBooth\GitGitHubLint\Validator\CapitalizeTheSubjectLineValidator;
8
9
/**
10
 * This is the status returned when the CapitalizeTheSubjectLineValidator identifies a problem
11
 *
12
 * @see     CapitalizeTheSubjectLineValidator
13
 *
14
 * @package PurpleBooth\GitGitHubLint\Status
15
 */
16
class CapitalizeTheSubjectLineStatus 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
     * The GitHub equivalent of this state
32
     *
33
     * Can be one of pending, success, error, or failure.
34
     *
35
     * @return string
36
     */
37
    public function getState() : string
38
    {
39
        return Status::STATE_FAILURE;
40
    }
41
42
    /**
43
     * A human readable message that describes this state
44
     *
45
     * This will be displayed to the user via the GitHub state
46
     *
47
     * @return string
48
     */
49
    public function getMessage() : string
50
    {
51
        return 'Please capitalise the subject line of the commit message';
52
    }
53
}
54