Completed
Push — master ( dbe031...1e3a1a )
by Marcel
01:42
created

XDebugIsNotEnabled::name()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace BeyondCode\SelfDiagnosis\Checks;
4
5
use BeyondCode\SelfDiagnosis\Checks\Check;
6
7
class XDebugIsNotEnabled implements Check
8
{
9
    /**
10
     * The name of the check.
11
     *
12
     * @return string
13
     */
14
    public function name(array $config): string
15
    {
16
        return 'The xdebug extension is not active.';
17
    }
18
19
    /**
20
     * Perform the actual verification of this check.
21
     *
22
     * @return bool
23
     */
24
    public function check(array $config): bool
25
    {
26
        return extension_loaded('xdebug') === false;
27
    }
28
29
    /**
30
     * The error message to display in case the check does not pass.
31
     *
32
     * @return string
33
     */
34
    public function message(array $config): string
35
    {
36
        return 'You should not have the "xdebug" PHP extension activated in production.';
37
    }
38
}
39