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

PreviousFailureStatus::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
/**
8
 * This status indicates that there has been a problem in a status prior to this message, however this particular status
9
 * is fine
10
 *
11
 * @package PurpleBooth\GitGitHubLint\Status
12
 */
13
class PreviousFailureStatus implements Status
14
{
15
    /**
16
     * Get the importance of this status.
17
     *
18
     * The lower the value the less important it is, the higher the more important.
19
     *
20
     * @return int
21
     */
22
    public function getWeight() : int
23
    {
24
        return Status::WEIGHT_OTHER_ERRORS;
25
    }
26
27
    /**
28
     * The GitHub equivalent of this state
29
     *
30
     * Can be one of pending, success, error, or failure.
31
     *
32
     * @return string
33
     */
34
    public function getState() : string
35
    {
36
        return Status::STATE_FAILURE;
37
    }
38
39
    /**
40
     * A human readable message that describes this state
41
     *
42
     * This will be displayed to the user via the GitHub state
43
     *
44
     * @return string
45
     */
46
    public function getMessage() : string
47
    {
48
        return 'This commit message is fine, but the others are not so good.';
49
    }
50
}
51