1 | <?php |
||
14 | class RedisCanBeAccessed implements Check |
||
15 | { |
||
16 | private $message; |
||
17 | |||
18 | /** |
||
19 | * The name of the check. |
||
20 | * |
||
21 | * @param array $config |
||
22 | * @return string |
||
23 | */ |
||
24 | public function name(array $config): string |
||
28 | |||
29 | /** |
||
30 | * Perform the actual verification of this check. |
||
31 | * |
||
32 | * @param array $config |
||
33 | * @return bool |
||
34 | */ |
||
35 | public function check(array $config): bool |
||
63 | |||
64 | /** |
||
65 | * The error message to display in case the check does not pass. |
||
66 | * |
||
67 | * @param array $config |
||
68 | * @return string |
||
69 | */ |
||
70 | public function message(array $config): string |
||
76 | |||
77 | /** |
||
78 | * Tests a redis connection and returns whether the connection is opened or not. |
||
79 | * |
||
80 | * @param string|null $name |
||
81 | * @return bool |
||
82 | */ |
||
83 | private function testConnection(?string $name = null): bool |
||
97 | } |
||
98 |