PreviousFailureStatus::getDetailsUrl()   A
last analyzed

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
rs 10
c 0
b 0
f 0
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\GitLintValidators\Status\Status;
8
9
/**
10
 * This status indicates that there has been a problem in a status prior to this message, however this particular status
11
 * is fine
12
 *
13
 * @package PurpleBooth\GitGitHubLint\Status
14
 */
15
class PreviousFailureStatus implements Status
16
{
17
    /**
18
     * Get the importance of this status.
19
     *
20
     * The lower the value the less important it is, the higher the more important.
21
     *
22
     * @return int
23
     */
24
    public function getWeight() : int
25
    {
26
        return Status::WEIGHT_OTHER_ERRORS;
27
    }
28
29
    /**
30
     * A human readable message that describes this state
31
     *
32
     * This will be displayed to the user via the GitHub state
33
     *
34
     * @return string
35
     */
36
    public function getMessage() : string
37
    {
38
        return 'This commit message is fine, but the others are not so good.';
39
    }
40
41
    /**
42
     * Is true if the status on GitHub would be success
43
     *
44
     * @return boolean
45
     */
46
    public function isPositive() : bool
47
    {
48
        return false;
49
    }
50
51
    /**
52
     * Get a URL with further explanation about this commit message status
53
     *
54
     * @return string
55
     */
56
    public function getDetailsUrl() : string
57
    {
58
        return "http://chris.beams.io/posts/git-commit/";
59
    }
60
}
61