CapitalizeTheSubjectLineStatus::isPositive()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright (C) 2016 Billie Thompson
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace PurpleBooth\GitLintValidators\Status;
13
14
use PurpleBooth\GitLintValidators\Validator\CapitalizeTheSubjectLineValidator;
15
16
/**
17
 * This is the status returned when the CapitalizeTheSubjectLineValidator identifies a problem.
18
 *
19
 * @see     CapitalizeTheSubjectLineValidator
20
 */
21
class CapitalizeTheSubjectLineStatus implements Status
22
{
23
    /**
24
     * Get the importance of this status.
25
     *
26
     * The lower the value the less important it is, the higher the more important.
27
     *
28
     * @return int
29
     */
30
    public function getWeight(): int
31
    {
32
        return Status::WEIGHT_ERROR;
33
    }
34
35
    /**
36
     * A human readable message that describes this state.
37
     *
38
     * This will be displayed to the user via the GitHub state
39
     *
40
     * @return string
41
     */
42
    public function getMessage(): string
43
    {
44
        return 'Please capitalise the subject line of the commit message';
45
    }
46
47
    /**
48
     * Is true if the status is one that should not be taken as indicative of a incorrectly formatted message.
49
     *
50
     * @return bool
51
     */
52
    public function isPositive(): bool
53
    {
54
        return false;
55
    }
56
57
    /**
58
     * Get a URL with further explanation about this commit message status.
59
     *
60
     * @return string
61
     */
62
    public function getDetailsUrl(): string
63
    {
64
        return 'http://chris.beams.io/posts/git-commit/#capitalize';
65
    }
66
}
67