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

SuccessStatus::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
declare(strict_types = 1);
3
namespace PurpleBooth\GitGitHubLint\Status;
4
5
/**
6
 * This is the status returned when a validator does not find any problems and no prior commits have had a problem
7
 *
8
 * @package PurpleBooth\GitGitHubLint\Status
9
 */
10
class SuccessStatus implements Status
11
{
12
    /**
13
     * Get the importance of this status.
14
     *
15
     * The lower the value the less important it is, the higher the more important.
16
     *
17
     * @return int
18
     */
19
    public function getWeight() : int
20
    {
21
        return Status::WEIGHT_SUCCESS;
22
    }
23
24
    /**
25
     * The GitHub equivalent of this state
26
     *
27
     * Can be one of pending, success, error, or failure.
28
     *
29
     * @return string
30
     */
31
    public function getState() : string
32
    {
33
        return Status::STATE_SUCCESS;
34
    }
35
36
    /**
37
     * A human readable message that describes this state
38
     *
39
     * This will be displayed to the user via the GitHub state
40
     *
41
     * @return string
42
     */
43
    public function getMessage() : string
44
    {
45
        return 'Commit message looking good!';
46
    }
47
}
48