1 | <?php |
||
20 | class RedisCanBeAccessed implements Check |
||
21 | { |
||
22 | private $message; |
||
23 | |||
24 | /** |
||
25 | * The name of the check. |
||
26 | * |
||
27 | * @param array $config |
||
28 | * @return string |
||
29 | */ |
||
30 | public function name(array $config): string |
||
34 | |||
35 | /** |
||
36 | * Perform the actual verification of this check. |
||
37 | * |
||
38 | * @param array $config |
||
39 | * @return bool |
||
40 | */ |
||
41 | public function check(array $config): bool |
||
69 | |||
70 | /** |
||
71 | * The error message to display in case the check does not pass. |
||
72 | * |
||
73 | * @param array $config |
||
74 | * @return string |
||
75 | */ |
||
76 | public function message(array $config): string |
||
82 | |||
83 | /** |
||
84 | * Tests a redis connection and returns whether the connection is opened or not. |
||
85 | * |
||
86 | * @param string|null $name |
||
87 | * @return bool |
||
88 | */ |
||
89 | private function testConnection(?string $name = null): bool |
||
103 | } |
||
104 |