Completed
Push — master ( d51385...c569d6 )
by Marcel
01:54
created

XDebugIsNotEnabled::message()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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