Passed
Push — master ( 841ef4...6107a2 )
by FX
03:30
created

Status::getLabel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Copyright (c) 2017 Francois-Xavier Soubirou.
5
 *
6
 * This file is part of ci-report.
7
 *
8
 * ci-report is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation, either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * ci-report is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with ci-report. If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
namespace AppBundle\Entity;
23
24
/**
25
 * Status class.
26
 */
27
class Status {
28
29
    const SUCCESS = 1;
30
    const FAILED = 2;
31
    const ERROR = 4;
32
    const SKIPPED = 8;
33
    const WARNING = 16;
34
    Const LABEL = array(
35
        1 => "Passed",
36
        2 => "Failed",
37
        4 => "Errored",
38
        8 => "Skipped",
39
        16 => "Warning",
40
    );
41
42
    /**
43
     * Get label status.
44
     *
45
     * @param int $status
46
     *
47
     * @return string
48
     */
49
    static public function getLabel(int $status) {
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
50
        return Status::LABEL[$status];
51
    }
52
}
53