1 | <?php declare(strict_types=1); |
||
19 | class ProcessEnvironment |
||
20 | { |
||
21 | /** |
||
22 | * @var ValueProvider[] |
||
23 | */ |
||
24 | private $constants; |
||
25 | |||
26 | /** |
||
27 | * @var ValueProvider[] |
||
28 | */ |
||
29 | private $variables; |
||
30 | |||
31 | /** |
||
32 | * @var Template[] |
||
33 | */ |
||
34 | private $templates; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | private $dotenvVariables; |
||
40 | |||
41 | /** |
||
42 | * @param ScriptsPath[] $dotenvPaths |
||
43 | */ |
||
44 | public function __construct(array $constants, array $variables, array $templates, array $dotenvPaths) |
||
51 | |||
52 | /** |
||
53 | * @return ValueProvider[] |
||
54 | */ |
||
55 | private function initializeConstants(array $constants): array |
||
64 | |||
65 | /** |
||
66 | * @return ValueProvider[] |
||
67 | */ |
||
68 | private function initializeVariables(array $variables): array |
||
78 | |||
79 | /** |
||
80 | * @param DotenvFile[] $dotenvPaths |
||
81 | * @return ValueProvider[] |
||
82 | */ |
||
83 | private function initializeDotenvVariables(array $dotenvPaths): array |
||
97 | |||
98 | /** |
||
99 | * @return Template[] |
||
100 | */ |
||
101 | private function initializeTemplates(array $templates): array |
||
110 | |||
111 | /** |
||
112 | * @return ValueProvider[] |
||
113 | */ |
||
114 | public function getAllValues(): array |
||
122 | |||
123 | /** |
||
124 | * @return Template[] |
||
125 | */ |
||
126 | public function getTemplates(): array |
||
130 | |||
131 | public function createProcess(string $shellCommand): Process |
||
135 | |||
136 | private function loadDotenvVariables(DotenvFile $dotenvPath): array |
||
142 | |||
143 | private function loadEnvVarsFromDotenvFile(DotenvFile $dotenvPath): array |
||
154 | |||
155 | private function diffDotenvVarsWithCurrentApplicationEnv(array $fileData): array |
||
178 | } |
||
179 |
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: