DebugModeIsNotEnabled   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 36
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A name() 0 4 1
A check() 0 4 1
A message() 0 4 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
    public function name(array $config): string
15
    {
16
        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
    public function check(array $config): bool
26
    {
27
        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
    public function message(array $config): string
37
    {
38
        return trans('self-diagnosis::checks.debug_mode_is_not_enabled.message');
39
    }
40
}
41