Completed
Pull Request — master (#60)
by
unknown
177:15
created

DebugModeIsNotEnabled::check()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace BeyondCode\SelfDiagnosis\Checks;
4
5
class DebugModeIsNotEnabled implements Check
6
{
7
8
    /**
9
     * The name of the check.
10
     *
11
     * @param array $config
12
     * @return string
13
     */
14 4
    public function name(array $config): string
15
    {
16 4
        return trans('self-diagnosis::checks.debug_mode_is_not_enabled.name');
17
    }
18
19
    /**
20
     * Perform the actual verification of this check.
21
     *
22
     * @param array $config
23
     * @return bool
24
     */
25 8
    public function check(array $config): bool
26
    {
27 8
        return config('app.debug') === false;
28
    }
29
30
    /**
31
     * The error message to display in case the check does not pass.
32
     *
33
     * @param array $config
34
     * @return string
35
     */
36 4
    public function message(array $config): string
37
    {
38 4
        return trans('self-diagnosis::checks.debug_mode_is_not_enabled.message');
39
    }
40
}
41