Completed
Push — master ( 68efd7...e19da4 )
by Billie
09:36
created

SeperateSubjectFromBodyWithABlankLineStatus   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 38
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
use PurpleBooth\GitGithubLint\Validator\SeperateSubjectFromBodyWithABlankLineValidator;
8
9
/**
10
 * This is the status returned when the SeperateSubjectFromBodyWithABlankLineValidator identifies a problem
11
 *
12
 * @see     SeperateSubjectFromBodyWithABlankLineValidator
13
 *
14
 * @package PurpleBooth\GitGithubLint\Status
15
 */
16
class SeperateSubjectFromBodyWithABlankLineStatus implements Status
0 ignored issues
show
Bug introduced by
There is one abstract method isPositive in this class; you could implement it, or declare this class as abstract.
Loading history...
17
{
18
    /**
19
     * Get the importance of this status.
20
     *
21
     * The lower the value the less important it is, the higher the more important.
22
     *
23
     * @return int
24
     */
25
    public function getWeight() : int
26
    {
27
        return Status::WEIGHT_ERROR;
28
    }
29
30
    /**
31
     * The GitHub equivalent of this state
32
     *
33
     * Can be one of pending, success, error, or failure.
34
     *
35
     * @return string
36
     */
37
    public function getState() : string
38
    {
39
        return Status::STATE_FAILURE;
40
    }
41
42
    /**
43
     * A human readable message that describes this state
44
     *
45
     * This will be displayed to the user via the GitHub state
46
     *
47
     * @return string
48
     */
49
    public function getMessage() : string
50
    {
51
        return 'Please put a single blank line between the subject and body of the commit message';
52
    }
53
}
54