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

getState()   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
declare(strict_types = 1);
3
namespace PurpleBooth\GitGitHubLint\Status;
4
5
use PurpleBooth\GitGitHubLint\Validator\LimitTheTitleLengthTo69CharactersValidator;
6
7
/**
8
 * This is the status returned when the LimitTheTitleLengthTo69CharactersValidator identifies a problem
9
 *
10
 * @see     LimitTheTitleLengthTo69CharactersValidator
11
 *
12
 * @package PurpleBooth\GitGitHubLint\Status
13
 */
14
class LimitTheTitleLengthTo69CharactersStatus implements Status
15
{
16
    /**
17
     * Get the importance of this status.
18
     *
19
     * The lower the value the less important it is, the higher the more important.
20
     *
21
     * @return int
22
     */
23
    public function getWeight() : int
24
    {
25
        return Status::WEIGHT_ERROR;
26
    }
27
28
    /**
29
     * The GitHub equivalent of this state
30
     *
31
     * Can be one of pending, success, error, or failure.
32
     *
33
     * @return string
34
     */
35
    public function getState() : string
36
    {
37
        return Status::STATE_FAILURE;
38
    }
39
40
    /**
41
     * A human readable message that describes this state
42
     *
43
     * This will be displayed to the user via the GitHub state
44
     *
45
     * @return string
46
     */
47
    public function getMessage() : string
48
    {
49
        return 'Please limit the subject line length of the commit message to 69 characters';
50
    }
51
}
52