ConfigurationIsCached::check()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace BeyondCode\SelfDiagnosis\Checks;
4
5
class ConfigurationIsCached 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.configuration_is_cached.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 app()->configurationIsCached() === true;
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.configuration_is_cached.message');
39
    }
40
}
41