1 | <?php |
||
11 | class UsedEnvironmentVariablesAreDefined implements Check |
||
12 | { |
||
13 | /** |
||
14 | * Stores processed var names |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | private $processed = []; |
||
19 | |||
20 | /** |
||
21 | * Stores undefined var names |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | public $undefined = []; |
||
26 | |||
27 | /** |
||
28 | * The amount of undefined .env variables |
||
29 | * |
||
30 | * @var integer |
||
31 | */ |
||
32 | public $amount = 0; |
||
33 | |||
34 | /** |
||
35 | * The name of the check. |
||
36 | * |
||
37 | * @param array $config |
||
38 | * @return string |
||
39 | */ |
||
40 | public function name(array $config): string |
||
44 | |||
45 | /** |
||
46 | * The error message to display in case the check does not pass. |
||
47 | * |
||
48 | * @param array $config |
||
49 | * @return string |
||
50 | */ |
||
51 | 4 | public function message(array $config): string |
|
58 | |||
59 | /** |
||
60 | * Perform the actual verification of this check. |
||
61 | * |
||
62 | * @param array $config |
||
63 | * @return bool |
||
64 | * @throws \Exception |
||
65 | */ |
||
66 | 4 | public function check(array $config): bool |
|
98 | |||
99 | /** |
||
100 | * Get result based on comma separated parsed env() parameters |
||
101 | * |
||
102 | * @param array $values |
||
103 | * @return object|bool |
||
104 | */ |
||
105 | 4 | private function getResult(array $values) |
|
121 | |||
122 | /** |
||
123 | * Store result and optional runtime output |
||
124 | * |
||
125 | * @param $result |
||
126 | */ |
||
127 | 4 | private function storeResult($result) |
|
134 | |||
135 | 4 | private function recursiveDirSearch(string $folder, string $pattern): array |
|
156 | } |
||
157 |