1 | <?php |
||
11 | class EnvVariablesExists implements Check |
||
12 | { |
||
13 | /** |
||
14 | * Stores processed var names |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | private $processed = []; |
||
19 | |||
20 | /** |
||
21 | * The empty results of performed scan |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | public $undefined = 0; |
||
26 | |||
27 | /** |
||
28 | * The name of the check. |
||
29 | * |
||
30 | * @param array $config |
||
31 | * @return string |
||
32 | */ |
||
33 | public function name(array $config): string |
||
37 | |||
38 | /** |
||
39 | * The error message to display in case the check does not pass. |
||
40 | * |
||
41 | * @param array $config |
||
42 | * @return string |
||
43 | */ |
||
44 | public function message(array $config): string |
||
50 | |||
51 | /** |
||
52 | * Directories to start recursive search for env()'s from |
||
53 | * Defaults to config_path() |
||
54 | * |
||
55 | * @var string $dir |
||
56 | */ |
||
57 | public $paths; |
||
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) |
|
133 | |||
134 | 4 | private function recursiveDirSearch(string $folder, string $pattern): array |
|
155 | } |
||
156 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..