1 | <?php |
||
11 | class EnvVariablesExists implements Check |
||
12 | { |
||
13 | /** |
||
14 | * The empty results of performed scan |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | public $empty = 0; |
||
19 | |||
20 | /** |
||
21 | * The name of the check. |
||
22 | * |
||
23 | * @param array $config |
||
24 | * @return string |
||
25 | */ |
||
26 | public function name(array $config): string |
||
30 | |||
31 | /** |
||
32 | * The error message to display in case the check does not pass. |
||
33 | * |
||
34 | * @param array $config |
||
35 | * @return string |
||
36 | */ |
||
37 | public function message(array $config): string |
||
43 | |||
44 | /** |
||
45 | * Directories to start recursive search for env()'s from |
||
46 | * Defaults to config_path() |
||
47 | * |
||
48 | * @var string $dir |
||
49 | */ |
||
50 | public $paths; |
||
51 | |||
52 | /** |
||
53 | * Perform the actual verification of this check. |
||
54 | * |
||
55 | * @param array $config |
||
56 | * @return bool |
||
57 | * @throws \Exception |
||
58 | */ |
||
59 | 4 | public function check(array $config): bool |
|
87 | |||
88 | /** |
||
89 | * Get result based on comma separated parsed env() parameters |
||
90 | * |
||
91 | * @param array $values |
||
92 | * @return object |
||
93 | */ |
||
94 | 4 | private function getResult(array $values) |
|
102 | |||
103 | /** |
||
104 | * Store result and optional runtime output |
||
105 | * |
||
106 | * @param $result |
||
107 | */ |
||
108 | 4 | private function storeResult($result) |
|
114 | |||
115 | 4 | private function recursiveDirSearch(string $folder, string $pattern): array |
|
136 | } |
||
137 |
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..