1 | <?php declare(strict_types=1); |
||
17 | class ProcessEnvironment |
||
18 | { |
||
19 | /** |
||
20 | * @var ValueProvider[] |
||
21 | */ |
||
22 | private $constants; |
||
23 | |||
24 | /** |
||
25 | * @var ValueProvider[] |
||
26 | */ |
||
27 | private $variables; |
||
28 | |||
29 | /** |
||
30 | * @var Template[] |
||
31 | */ |
||
32 | private $templates; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | private $dotenvVariables; |
||
38 | |||
39 | /** |
||
40 | * @param array $constants |
||
41 | * @param array $variables |
||
42 | * @param array $templates |
||
43 | * @param array $dotenvPaths |
||
44 | */ |
||
45 | public function __construct(array $constants, array $variables, array $templates, array $dotenvPaths) |
||
52 | |||
53 | /** |
||
54 | * @param array $constants |
||
55 | * @return ValueProvider[] |
||
56 | */ |
||
57 | private function initializeConstants(array $constants): array |
||
66 | |||
67 | /** |
||
68 | * @param array $variables |
||
69 | * @return ValueProvider[] |
||
70 | */ |
||
71 | private function initializeVariables(array $variables): array |
||
81 | |||
82 | /** |
||
83 | * @param ScriptPath[] $dotenvPaths |
||
84 | * @return ValueProvider[] |
||
85 | */ |
||
86 | private function initializeDotenvVariables(array $dotenvPaths): array |
||
100 | |||
101 | /** |
||
102 | * @param array $templates |
||
103 | * @return ValueProvider[] |
||
104 | */ |
||
105 | private function initializeTemplates(array $templates): array |
||
114 | |||
115 | /** |
||
116 | * @return ValueProvider[] |
||
117 | */ |
||
118 | public function getAllValues(): array |
||
126 | |||
127 | /** |
||
128 | * @return Template[] |
||
129 | */ |
||
130 | public function getTemplates(): array |
||
134 | |||
135 | /** |
||
136 | * @param string $shellCommand |
||
137 | * @return Process |
||
138 | */ |
||
139 | public function createProcess(string $shellCommand): Process |
||
143 | |||
144 | /** |
||
145 | * @param ScriptPath $dotenvPath |
||
146 | * |
||
147 | * @return array |
||
148 | */ |
||
149 | private function loadDotenvVariables(ScriptPath $dotenvPath): array |
||
156 | |||
157 | /** |
||
158 | * @param ScriptPath $dotenvPath |
||
159 | * @param DotenvFactory $dotenvFactory |
||
160 | * @return array |
||
161 | */ |
||
162 | private function loadDotenvFile(ScriptPath $dotenvPath, DotenvFactory $dotenvFactory): array |
||
173 | |||
174 | /** |
||
175 | * @param array $fileData |
||
176 | * @param DotenvFactory $dotenvFactory |
||
177 | * @return array |
||
178 | */ |
||
179 | private function diffDotenvVarsWithEnv(array $fileData, DotenvFactory $dotenvFactory): array |
||
191 | } |
||
192 |
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..