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

PreviousFailureStatus   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 38
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getWeight() 0 4 1
A getState() 0 4 1
A getMessage() 0 4 1
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