1 | <?php declare(strict_types=1); |
||
18 | class ProcessEnvironment |
||
19 | { |
||
20 | /** |
||
21 | * @var ValueProvider[] |
||
22 | */ |
||
23 | private $constants; |
||
24 | |||
25 | /** |
||
26 | * @var ValueProvider[] |
||
27 | */ |
||
28 | private $variables; |
||
29 | |||
30 | /** |
||
31 | * @var Template[] |
||
32 | */ |
||
33 | private $templates; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | private $dotenvVariables; |
||
39 | |||
40 | /** |
||
41 | * @param DotenvFile[] $dotenvPaths |
||
42 | */ |
||
43 | public function __construct(array $constants, array $variables, array $templates, array $dotenvPaths) |
||
50 | |||
51 | /** |
||
52 | * @return ValueProvider[] |
||
53 | */ |
||
54 | private function initializeConstants(array $constants): array |
||
63 | |||
64 | /** |
||
65 | * @return ValueProvider[] |
||
66 | */ |
||
67 | private function initializeVariables(array $variables): array |
||
77 | |||
78 | /** |
||
79 | * @param DotenvFile[] $dotenvPaths |
||
80 | * @return ValueProvider[] |
||
81 | */ |
||
82 | private function initializeDotenvVariables(array $dotenvPaths): array |
||
96 | |||
97 | /** |
||
98 | * @return Template[] |
||
99 | */ |
||
100 | private function initializeTemplates(array $templates): array |
||
109 | |||
110 | /** |
||
111 | * @return ValueProvider[] |
||
112 | */ |
||
113 | public function getAllValues(): array |
||
121 | |||
122 | /** |
||
123 | * @return Template[] |
||
124 | */ |
||
125 | public function getTemplates(): array |
||
129 | |||
130 | public function createProcess(string $shellCommand): Process |
||
134 | |||
135 | private function loadDotenvVariables(DotenvFile $dotenvPath): array |
||
141 | |||
142 | private function loadEnvVarsFromDotenvFile(DotenvFile $dotenvPath): array |
||
153 | |||
154 | private function diffDotenvVarsWithCurrentApplicationEnv(array $fileData): array |
||
177 | } |
||
178 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: